@atlaskit/editor-core 197.11.0 → 197.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/cjs/editor-appearances/FullPageEditor.js +2 -1
  3. package/dist/cjs/editor-appearances/FullWidthEditor.js +1 -0
  4. package/dist/cjs/presets/universal.js +1 -4
  5. package/dist/cjs/ui/ContentStyles/panel.js +1 -1
  6. package/dist/cjs/ui/Toolbar/toolbar-size.js +19 -1
  7. package/dist/cjs/ui/Toolbar/types.js +6 -0
  8. package/dist/cjs/version-wrapper.js +1 -1
  9. package/dist/es2019/editor-appearances/FullPageEditor.js +2 -1
  10. package/dist/es2019/editor-appearances/FullWidthEditor.js +1 -0
  11. package/dist/es2019/presets/universal.js +1 -4
  12. package/dist/es2019/ui/ContentStyles/panel.js +0 -1
  13. package/dist/es2019/ui/Toolbar/toolbar-size.js +19 -2
  14. package/dist/es2019/ui/Toolbar/types.js +1 -1
  15. package/dist/es2019/version-wrapper.js +1 -1
  16. package/dist/esm/editor-appearances/FullPageEditor.js +2 -1
  17. package/dist/esm/editor-appearances/FullWidthEditor.js +1 -0
  18. package/dist/esm/presets/universal.js +1 -4
  19. package/dist/esm/ui/ContentStyles/panel.js +1 -1
  20. package/dist/esm/ui/Toolbar/toolbar-size.js +19 -2
  21. package/dist/esm/ui/Toolbar/types.js +1 -1
  22. package/dist/esm/version-wrapper.js +1 -1
  23. package/dist/types/editor-appearances/FullPageEditor.d.ts +1 -0
  24. package/dist/types/editor-appearances/FullWidthEditor.d.ts +1 -0
  25. package/dist/types/ui/Toolbar/types.d.ts +1 -1
  26. package/dist/types-ts4.5/editor-appearances/FullPageEditor.d.ts +1 -0
  27. package/dist/types-ts4.5/editor-appearances/FullWidthEditor.d.ts +1 -0
  28. package/dist/types-ts4.5/ui/Toolbar/types.d.ts +1 -1
  29. package/package.json +9 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 197.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#144047](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/144047)
8
+ [`0e77caf52a59d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0e77caf52a59d) -
9
+ add new full page toolbar breakpoints
10
+ - [#145317](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/145317)
11
+ [`ecfdb14f93474`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ecfdb14f93474) -
12
+ Add appearance prop for FullPageEditor so that it can be re-used for full-width mode.
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+
18
+ ## 197.11.1
19
+
20
+ ### Patch Changes
21
+
22
+ - [#144925](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/144925)
23
+ [`9faf9ff89ad37`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9faf9ff89ad37) -
24
+ ED-24822 - Add padding to panels with no icon and unhide drag handle in first bodied node
25
+
3
26
  ## 197.11.0
4
27
 
5
28
  ### Minor Changes
@@ -20,8 +20,9 @@ var _FullPage = _interopRequireDefault(require("../ui/Appearance/FullPage"));
20
20
  * @returns Editor component
21
21
  */
22
22
  function FullPageEditor(props) {
23
+ var _props$appearance;
23
24
  return /*#__PURE__*/_react.default.createElement(_coreEditor.CoreEditor, (0, _extends2.default)({}, props, {
24
- appearance: "full-page",
25
+ appearance: (_props$appearance = props.appearance) !== null && _props$appearance !== void 0 ? _props$appearance : 'full-page',
25
26
  AppearanceComponent: _FullPage.default
26
27
  }));
27
28
  }
@@ -18,6 +18,7 @@ var _FullPage = _interopRequireDefault(require("../ui/Appearance/FullPage"));
18
18
  *
19
19
  * @param props FullWidthEditorProps
20
20
  * @returns Editor component
21
+ * @deprecated In favour of `FullPageEditor` with appearance "full-width"
21
22
  */
22
23
  function FullWidthEditor(props) {
23
24
  return /*#__PURE__*/_react.default.createElement(_coreEditor.CoreEditor, (0, _extends2.default)({}, props, {
@@ -223,10 +223,7 @@ function createUniversalPresetInternal(_ref) {
223
223
  tableSelectorSupported: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableSelector) && isFullPage,
224
224
  nativeStatusSupported: !statusMenuDisabled,
225
225
  showElementBrowserLink: props.elementBrowser && props.elementBrowser.showModal || false,
226
- // @ts-ignore
227
- // For platform_editor_element_level_templates experiment only
228
- // clean up ticket ED-24873
229
- UNSAFE_editorAppearance: appearance
226
+ appearance: appearance
230
227
  }]).maybeAdd([_beforePrimaryToolbar.beforePrimaryToolbarPlugin, {
231
228
  beforePrimaryToolbarComponents: // @ts-expect-error 2339: Property 'before' does not exist on type 'PrimaryToolbarComponents'.
232
229
  (_props$primaryToolbar = props.primaryToolbarComponents) === null || _props$primaryToolbar === void 0 ? void 0 : _props$primaryToolbar.before
@@ -13,5 +13,5 @@ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
13
13
  var _templateObject; // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
14
14
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation due to mixin usage
15
15
  var panelStyles = exports.panelStyles = function panelStyles() {
16
- return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t.", " {\n\t\t\tcursor: pointer;\n\n\t\t\t/* Danger when top level node */\n\t\t\t&.danger {\n\t\t\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t\t\t\tbackground-color: ", " !important;\n\n\t\t\t\t.", " {\n\t\t\t\t\tcolor: ", " !important;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t.", " {\n\t\t\tcursor: text;\n\t\t}\n\n\t\t/* Danger when nested node */\n\t\t.danger .", " {\n\t\t\t&[data-panel-type] {\n\t\t\t\tbackground-color: ", ";\n\n\t\t\t\t.", " {\n\t\t\t\t\tcolor: ", ";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t", ";\n\t}\n\n\t.", ".", ":not(.danger) {\n\t\t", "\n\t}\n\n\t", ";\n\n\t/* Don't want extra padding for inline editor (nested) */\n\t", ";\n"])), _panel.PanelSharedCssClassName.prefix, _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), _panel.PanelSharedCssClassName.icon, "var(--ds-icon-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), _panel.PanelSharedCssClassName.content, _panel.PanelSharedCssClassName.prefix, "var(--ds-blanket-danger, ".concat(_editorSharedStyles.akEditorDeleteBackgroundWithOpacity, ")"), _panel.PanelSharedCssClassName.icon, "var(--ds-icon-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), (0, _panel.panelSharedStyles)(), _panel.PanelSharedCssClassName.prefix, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Blanket]), (0, _experiments.editorExperiment)('nested-dnd', true) && ".ak-editor-content-area.appearance-full-page .ProseMirror {\n\t\t.ak-editor-panel .".concat(_panel.PanelSharedCssClassName.icon, " {\n\t\t\tpadding-right: ", "var(--ds-space-150, 12px)", ";\n\t\t}\n\n\t\t.ak-editor-panel.").concat(_panel.PanelSharedCssClassName.noIcon, " {\n\t\t\tpadding-left: ", "var(--ds-space-250, 20px)", ";\n\t\t\tpadding-right: ", "var(--ds-space-250, 20px)", ";\n\t\t}\n\t}"), (0, _experiments.editorExperiment)('nested-dnd', true) && ".ak-editor-content-area .ak-editor-content-area .ProseMirror {\n\t\t.ak-editor-panel .".concat(_panel.PanelSharedCssClassName.icon, " {\n\t\t\tpadding-right: ", "var(--ds-space-100, 8px)", ";\n\t\t}\n\t\t.ak-editor-panel.").concat(_panel.PanelSharedCssClassName.noIcon, " {\n\t\t\tpadding-right: ", "var(--ds-space-150, 12px)", ";\n\t\t\tpadding-left: ", "var(--ds-space-150, 12px)", ";\n\n\t\t}\n\t}"));
16
+ return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t.", " {\n\t\t\tcursor: pointer;\n\n\t\t\t/* Danger when top level node */\n\t\t\t&.danger {\n\t\t\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t\t\t\tbackground-color: ", " !important;\n\n\t\t\t\t.", " {\n\t\t\t\t\tcolor: ", " !important;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t.", " {\n\t\t\tcursor: text;\n\t\t}\n\n\t\t/* Danger when nested node */\n\t\t.danger .", " {\n\t\t\t&[data-panel-type] {\n\t\t\t\tbackground-color: ", ";\n\n\t\t\t\t.", " {\n\t\t\t\t\tcolor: ", ";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t", ";\n\t}\n\n\t.", ".", ":not(.danger) {\n\t\t", "\n\t}\n\n\t", ";\n\n\t/* Don't want extra padding for inline editor (nested) */\n\t", ";\n"])), _panel.PanelSharedCssClassName.prefix, _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), _panel.PanelSharedCssClassName.icon, "var(--ds-icon-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), _panel.PanelSharedCssClassName.content, _panel.PanelSharedCssClassName.prefix, "var(--ds-blanket-danger, ".concat(_editorSharedStyles.akEditorDeleteBackgroundWithOpacity, ")"), _panel.PanelSharedCssClassName.icon, "var(--ds-icon-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), (0, _panel.panelSharedStyles)(), _panel.PanelSharedCssClassName.prefix, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Blanket]), (0, _experiments.editorExperiment)('nested-dnd', true) && ".ak-editor-content-area.appearance-full-page .ProseMirror {\n\t\t.ak-editor-panel .".concat(_panel.PanelSharedCssClassName.icon, " {\n\t\t\tpadding-right: ", "var(--ds-space-150, 12px)", ";\n\t\t}\n\n\t\t.ak-editor-panel.").concat(_panel.PanelSharedCssClassName.noIcon, " {\n\t\t\tpadding-left: ", "var(--ds-space-250, 20px)", ";\n\t\t\tpadding-right: ", "var(--ds-space-250, 20px)", ";\n\t\t}\n\t}"), (0, _experiments.editorExperiment)('nested-dnd', true) && ".ak-editor-content-area .ak-editor-content-area .ProseMirror {\n\t\t.ak-editor-panel .".concat(_panel.PanelSharedCssClassName.icon, " {\n\t\t\tpadding-right: ", "var(--ds-space-100, 8px)", ";\n\t\t}\n\t\t.ak-editor-panel.").concat(_panel.PanelSharedCssClassName.noIcon, " {\n\t\t\tpadding-right: ", "var(--ds-space-150, 12px)", ";\n\t\t\tpadding-left: ", "var(--ds-space-150, 12px)", ";\n\t\t}\n\t}"));
17
17
  };
@@ -4,8 +4,26 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.widthToToolbarSize = exports.toolbarSizeToWidth = void 0;
7
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
7
8
  var _isFullPage = require("../../utils/is-full-page");
8
9
  var _types = require("./types");
10
+ var toolbarSizesFullPageNext = [{
11
+ width: _types.ToolbarWidthsFullPageNext.XXL,
12
+ size: _types.ToolbarSize.XXL
13
+ }, {
14
+ width: _types.ToolbarWidthsFullPageNext.XL,
15
+ size: _types.ToolbarSize.XL
16
+ }, {
17
+ width: _types.ToolbarWidthsFullPageNext.L,
18
+ size: _types.ToolbarSize.L
19
+ }, {
20
+ width: _types.ToolbarWidthsFullPageNext.M,
21
+ size: _types.ToolbarSize.M
22
+ }, {
23
+ width: _types.ToolbarWidthsFullPageNext.S,
24
+ size: _types.ToolbarSize.S
25
+ }];
26
+
9
27
  // Toolbar sizes for full page editor a little bit different, because it has more buttons e.g. actions button...
10
28
  var toolbarSizesFullPage = [{
11
29
  width: _types.ToolbarWidthsFullPage.XXL,
@@ -40,7 +58,7 @@ var toolbarSizes = [{
40
58
  size: _types.ToolbarSize.S
41
59
  }];
42
60
  var toolbarSizesForAppearance = function toolbarSizesForAppearance(appearance) {
43
- return (0, _isFullPage.isFullPage)(appearance) ? toolbarSizesFullPage : toolbarSizes;
61
+ return (0, _isFullPage.isFullPage)(appearance) ? (0, _platformFeatureFlags.fg)('platform_editor_toolbar_responsive_fixes') ? toolbarSizesFullPageNext : toolbarSizesFullPage : toolbarSizes;
44
62
  };
45
63
  var toolbarSizeToWidth = exports.toolbarSizeToWidth = function toolbarSizeToWidth(toolbarSize, appearance) {
46
64
  return (toolbarSizesForAppearance(appearance).find(function (_ref) {
@@ -21,4 +21,10 @@ Object.defineProperty(exports, "ToolbarWidthsFullPage", {
21
21
  return _types.ToolbarWidthsFullPage;
22
22
  }
23
23
  });
24
+ Object.defineProperty(exports, "ToolbarWidthsFullPageNext", {
25
+ enumerable: true,
26
+ get: function get() {
27
+ return _types.ToolbarWidthsFullPageNext;
28
+ }
29
+ });
24
30
  var _types = require("@atlaskit/editor-common/types");
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "197.11.0";
8
+ var version = exports.version = "197.12.0";
@@ -13,8 +13,9 @@ import FullPage from '../ui/Appearance/FullPage';
13
13
  * @returns Editor component
14
14
  */
15
15
  export function FullPageEditor(props) {
16
+ var _props$appearance;
16
17
  return /*#__PURE__*/React.createElement(CoreEditor, _extends({}, props, {
17
- appearance: "full-page",
18
+ appearance: (_props$appearance = props.appearance) !== null && _props$appearance !== void 0 ? _props$appearance : 'full-page',
18
19
  AppearanceComponent: FullPage
19
20
  }));
20
21
  }
@@ -11,6 +11,7 @@ import FullPage from '../ui/Appearance/FullPage';
11
11
  *
12
12
  * @param props FullWidthEditorProps
13
13
  * @returns Editor component
14
+ * @deprecated In favour of `FullPageEditor` with appearance "full-width"
14
15
  */
15
16
  export function FullWidthEditor(props) {
16
17
  return /*#__PURE__*/React.createElement(CoreEditor, _extends({}, props, {
@@ -223,10 +223,7 @@ export default function createUniversalPresetInternal({
223
223
  tableSelectorSupported: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableSelector) && isFullPage,
224
224
  nativeStatusSupported: !statusMenuDisabled,
225
225
  showElementBrowserLink: props.elementBrowser && props.elementBrowser.showModal || false,
226
- // @ts-ignore
227
- // For platform_editor_element_level_templates experiment only
228
- // clean up ticket ED-24873
229
- UNSAFE_editorAppearance: appearance
226
+ appearance
230
227
  }]).maybeAdd([beforePrimaryToolbarPlugin, {
231
228
  beforePrimaryToolbarComponents: // @ts-expect-error 2339: Property 'before' does not exist on type 'PrimaryToolbarComponents'.
232
229
  (_props$primaryToolbar = props.primaryToolbarComponents) === null || _props$primaryToolbar === void 0 ? void 0 : _props$primaryToolbar.before
@@ -61,7 +61,6 @@ export const panelStyles = () => css`
61
61
  .ak-editor-panel.${PanelSharedCssClassName.noIcon} {
62
62
  padding-right: ${"var(--ds-space-150, 12px)"};
63
63
  padding-left: ${"var(--ds-space-150, 12px)"};
64
-
65
64
  }
66
65
  }`};
67
66
  `;
@@ -1,5 +1,22 @@
1
+ import { fg } from '@atlaskit/platform-feature-flags';
1
2
  import { isFullPage } from '../../utils/is-full-page';
2
- import { ToolbarSize, ToolbarWidths, ToolbarWidthsFullPage } from './types';
3
+ import { ToolbarSize, ToolbarWidths, ToolbarWidthsFullPage, ToolbarWidthsFullPageNext } from './types';
4
+ const toolbarSizesFullPageNext = [{
5
+ width: ToolbarWidthsFullPageNext.XXL,
6
+ size: ToolbarSize.XXL
7
+ }, {
8
+ width: ToolbarWidthsFullPageNext.XL,
9
+ size: ToolbarSize.XL
10
+ }, {
11
+ width: ToolbarWidthsFullPageNext.L,
12
+ size: ToolbarSize.L
13
+ }, {
14
+ width: ToolbarWidthsFullPageNext.M,
15
+ size: ToolbarSize.M
16
+ }, {
17
+ width: ToolbarWidthsFullPageNext.S,
18
+ size: ToolbarSize.S
19
+ }];
3
20
 
4
21
  // Toolbar sizes for full page editor a little bit different, because it has more buttons e.g. actions button...
5
22
  const toolbarSizesFullPage = [{
@@ -34,7 +51,7 @@ const toolbarSizes = [{
34
51
  width: ToolbarWidths.S,
35
52
  size: ToolbarSize.S
36
53
  }];
37
- const toolbarSizesForAppearance = appearance => isFullPage(appearance) ? toolbarSizesFullPage : toolbarSizes;
54
+ const toolbarSizesForAppearance = appearance => isFullPage(appearance) ? fg('platform_editor_toolbar_responsive_fixes') ? toolbarSizesFullPageNext : toolbarSizesFullPage : toolbarSizes;
38
55
  export const toolbarSizeToWidth = (toolbarSize, appearance) => {
39
56
  return (toolbarSizesForAppearance(appearance).find(({
40
57
  size
@@ -1 +1 @@
1
- export { ToolbarSize, ToolbarWidths, ToolbarWidthsFullPage } from '@atlaskit/editor-common/types';
1
+ export { ToolbarSize, ToolbarWidths, ToolbarWidthsFullPage, ToolbarWidthsFullPageNext } from '@atlaskit/editor-common/types';
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "197.11.0";
2
+ export const version = "197.12.0";
@@ -13,8 +13,9 @@ import FullPage from '../ui/Appearance/FullPage';
13
13
  * @returns Editor component
14
14
  */
15
15
  export function FullPageEditor(props) {
16
+ var _props$appearance;
16
17
  return /*#__PURE__*/React.createElement(CoreEditor, _extends({}, props, {
17
- appearance: "full-page",
18
+ appearance: (_props$appearance = props.appearance) !== null && _props$appearance !== void 0 ? _props$appearance : 'full-page',
18
19
  AppearanceComponent: FullPage
19
20
  }));
20
21
  }
@@ -11,6 +11,7 @@ import FullPage from '../ui/Appearance/FullPage';
11
11
  *
12
12
  * @param props FullWidthEditorProps
13
13
  * @returns Editor component
14
+ * @deprecated In favour of `FullPageEditor` with appearance "full-width"
14
15
  */
15
16
  export function FullWidthEditor(props) {
16
17
  return /*#__PURE__*/React.createElement(CoreEditor, _extends({}, props, {
@@ -216,10 +216,7 @@ export default function createUniversalPresetInternal(_ref) {
216
216
  tableSelectorSupported: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableSelector) && isFullPage,
217
217
  nativeStatusSupported: !statusMenuDisabled,
218
218
  showElementBrowserLink: props.elementBrowser && props.elementBrowser.showModal || false,
219
- // @ts-ignore
220
- // For platform_editor_element_level_templates experiment only
221
- // clean up ticket ED-24873
222
- UNSAFE_editorAppearance: appearance
219
+ appearance: appearance
223
220
  }]).maybeAdd([beforePrimaryToolbarPlugin, {
224
221
  beforePrimaryToolbarComponents: // @ts-expect-error 2339: Property 'before' does not exist on type 'PrimaryToolbarComponents'.
225
222
  (_props$primaryToolbar = props.primaryToolbarComponents) === null || _props$primaryToolbar === void 0 ? void 0 : _props$primaryToolbar.before
@@ -7,5 +7,5 @@ import { akEditorDeleteBackground, akEditorDeleteBackgroundWithOpacity, akEditor
7
7
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
8
8
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation due to mixin usage
9
9
  export var panelStyles = function panelStyles() {
10
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t.ProseMirror {\n\t\t.", " {\n\t\t\tcursor: pointer;\n\n\t\t\t/* Danger when top level node */\n\t\t\t&.danger {\n\t\t\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t\t\t\tbackground-color: ", " !important;\n\n\t\t\t\t.", " {\n\t\t\t\t\tcolor: ", " !important;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t.", " {\n\t\t\tcursor: text;\n\t\t}\n\n\t\t/* Danger when nested node */\n\t\t.danger .", " {\n\t\t\t&[data-panel-type] {\n\t\t\t\tbackground-color: ", ";\n\n\t\t\t\t.", " {\n\t\t\t\t\tcolor: ", ";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t", ";\n\t}\n\n\t.", ".", ":not(.danger) {\n\t\t", "\n\t}\n\n\t", ";\n\n\t/* Don't want extra padding for inline editor (nested) */\n\t", ";\n"])), PanelSharedCssClassName.prefix, akEditorSelectedBorderSize, akEditorDeleteBorder, "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), PanelSharedCssClassName.icon, "var(--ds-icon-danger, ".concat(akEditorDeleteIconColor, ")"), PanelSharedCssClassName.content, PanelSharedCssClassName.prefix, "var(--ds-blanket-danger, ".concat(akEditorDeleteBackgroundWithOpacity, ")"), PanelSharedCssClassName.icon, "var(--ds-icon-danger, ".concat(akEditorDeleteIconColor, ")"), panelSharedStyles(), PanelSharedCssClassName.prefix, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]), editorExperiment('nested-dnd', true) && ".ak-editor-content-area.appearance-full-page .ProseMirror {\n\t\t.ak-editor-panel .".concat(PanelSharedCssClassName.icon, " {\n\t\t\tpadding-right: ", "var(--ds-space-150, 12px)", ";\n\t\t}\n\n\t\t.ak-editor-panel.").concat(PanelSharedCssClassName.noIcon, " {\n\t\t\tpadding-left: ", "var(--ds-space-250, 20px)", ";\n\t\t\tpadding-right: ", "var(--ds-space-250, 20px)", ";\n\t\t}\n\t}"), editorExperiment('nested-dnd', true) && ".ak-editor-content-area .ak-editor-content-area .ProseMirror {\n\t\t.ak-editor-panel .".concat(PanelSharedCssClassName.icon, " {\n\t\t\tpadding-right: ", "var(--ds-space-100, 8px)", ";\n\t\t}\n\t\t.ak-editor-panel.").concat(PanelSharedCssClassName.noIcon, " {\n\t\t\tpadding-right: ", "var(--ds-space-150, 12px)", ";\n\t\t\tpadding-left: ", "var(--ds-space-150, 12px)", ";\n\n\t\t}\n\t}"));
10
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t.ProseMirror {\n\t\t.", " {\n\t\t\tcursor: pointer;\n\n\t\t\t/* Danger when top level node */\n\t\t\t&.danger {\n\t\t\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t\t\t\tbackground-color: ", " !important;\n\n\t\t\t\t.", " {\n\t\t\t\t\tcolor: ", " !important;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t.", " {\n\t\t\tcursor: text;\n\t\t}\n\n\t\t/* Danger when nested node */\n\t\t.danger .", " {\n\t\t\t&[data-panel-type] {\n\t\t\t\tbackground-color: ", ";\n\n\t\t\t\t.", " {\n\t\t\t\t\tcolor: ", ";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t", ";\n\t}\n\n\t.", ".", ":not(.danger) {\n\t\t", "\n\t}\n\n\t", ";\n\n\t/* Don't want extra padding for inline editor (nested) */\n\t", ";\n"])), PanelSharedCssClassName.prefix, akEditorSelectedBorderSize, akEditorDeleteBorder, "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), PanelSharedCssClassName.icon, "var(--ds-icon-danger, ".concat(akEditorDeleteIconColor, ")"), PanelSharedCssClassName.content, PanelSharedCssClassName.prefix, "var(--ds-blanket-danger, ".concat(akEditorDeleteBackgroundWithOpacity, ")"), PanelSharedCssClassName.icon, "var(--ds-icon-danger, ".concat(akEditorDeleteIconColor, ")"), panelSharedStyles(), PanelSharedCssClassName.prefix, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]), editorExperiment('nested-dnd', true) && ".ak-editor-content-area.appearance-full-page .ProseMirror {\n\t\t.ak-editor-panel .".concat(PanelSharedCssClassName.icon, " {\n\t\t\tpadding-right: ", "var(--ds-space-150, 12px)", ";\n\t\t}\n\n\t\t.ak-editor-panel.").concat(PanelSharedCssClassName.noIcon, " {\n\t\t\tpadding-left: ", "var(--ds-space-250, 20px)", ";\n\t\t\tpadding-right: ", "var(--ds-space-250, 20px)", ";\n\t\t}\n\t}"), editorExperiment('nested-dnd', true) && ".ak-editor-content-area .ak-editor-content-area .ProseMirror {\n\t\t.ak-editor-panel .".concat(PanelSharedCssClassName.icon, " {\n\t\t\tpadding-right: ", "var(--ds-space-100, 8px)", ";\n\t\t}\n\t\t.ak-editor-panel.").concat(PanelSharedCssClassName.noIcon, " {\n\t\t\tpadding-right: ", "var(--ds-space-150, 12px)", ";\n\t\t\tpadding-left: ", "var(--ds-space-150, 12px)", ";\n\t\t}\n\t}"));
11
11
  };
@@ -1,5 +1,22 @@
1
+ import { fg } from '@atlaskit/platform-feature-flags';
1
2
  import { isFullPage } from '../../utils/is-full-page';
2
- import { ToolbarSize, ToolbarWidths, ToolbarWidthsFullPage } from './types';
3
+ import { ToolbarSize, ToolbarWidths, ToolbarWidthsFullPage, ToolbarWidthsFullPageNext } from './types';
4
+ var toolbarSizesFullPageNext = [{
5
+ width: ToolbarWidthsFullPageNext.XXL,
6
+ size: ToolbarSize.XXL
7
+ }, {
8
+ width: ToolbarWidthsFullPageNext.XL,
9
+ size: ToolbarSize.XL
10
+ }, {
11
+ width: ToolbarWidthsFullPageNext.L,
12
+ size: ToolbarSize.L
13
+ }, {
14
+ width: ToolbarWidthsFullPageNext.M,
15
+ size: ToolbarSize.M
16
+ }, {
17
+ width: ToolbarWidthsFullPageNext.S,
18
+ size: ToolbarSize.S
19
+ }];
3
20
 
4
21
  // Toolbar sizes for full page editor a little bit different, because it has more buttons e.g. actions button...
5
22
  var toolbarSizesFullPage = [{
@@ -35,7 +52,7 @@ var toolbarSizes = [{
35
52
  size: ToolbarSize.S
36
53
  }];
37
54
  var toolbarSizesForAppearance = function toolbarSizesForAppearance(appearance) {
38
- return isFullPage(appearance) ? toolbarSizesFullPage : toolbarSizes;
55
+ return isFullPage(appearance) ? fg('platform_editor_toolbar_responsive_fixes') ? toolbarSizesFullPageNext : toolbarSizesFullPage : toolbarSizes;
39
56
  };
40
57
  export var toolbarSizeToWidth = function toolbarSizeToWidth(toolbarSize, appearance) {
41
58
  return (toolbarSizesForAppearance(appearance).find(function (_ref) {
@@ -1 +1 @@
1
- export { ToolbarSize, ToolbarWidths, ToolbarWidthsFullPage } from '@atlaskit/editor-common/types';
1
+ export { ToolbarSize, ToolbarWidths, ToolbarWidthsFullPage, ToolbarWidthsFullPageNext } from '@atlaskit/editor-common/types';
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "197.11.0";
2
+ export var version = "197.12.0";
@@ -3,6 +3,7 @@ import { type EditorNextProps } from '../types/editor-props';
3
3
  export type FullPageEditorProps = Pick<EditorNextProps, 'preset' | 'defaultValue' | 'disabled' | 'mentionProvider' | 'contextIdentifierProvider' | 'searchProvider' | 'annotationProviders' | 'collabEditProvider' | 'collabEdit' | 'taskDecisionProvider' | 'extensionProviders' | 'shouldFocus' | 'performanceTracking' | 'quickInsert' | 'secondaryToolbarComponents' | 'featureFlags' | 'trackValidTransactions' | 'primaryToolbarComponents' | 'contextPanel' | 'contentComponents' | 'primaryToolbarIconBefore' | 'sanitizePrivateContent'> & {
4
4
  onChange?: () => void;
5
5
  onEditorReady?: () => void;
6
+ appearance: 'full-page' | 'full-width';
6
7
  };
7
8
  /**
8
9
  * Editor component based on `ComposableEditor` which sets the `appearance` to "full-page".
@@ -13,5 +13,6 @@ export type FullWidthEditorProps = Pick<EditorNextProps, 'preset' | 'defaultValu
13
13
  *
14
14
  * @param props FullWidthEditorProps
15
15
  * @returns Editor component
16
+ * @deprecated In favour of `FullPageEditor` with appearance "full-width"
16
17
  */
17
18
  export declare function FullWidthEditor(props: FullWidthEditorProps): JSX.Element;
@@ -1,2 +1,2 @@
1
- export { ToolbarSize, ToolbarWidths, ToolbarWidthsFullPage } from '@atlaskit/editor-common/types';
1
+ export { ToolbarSize, ToolbarWidths, ToolbarWidthsFullPage, ToolbarWidthsFullPageNext, } from '@atlaskit/editor-common/types';
2
2
  export type { ToolbarUiComponentFactoryParams, ToolbarUIComponentFactory, } from '@atlaskit/editor-common/types';
@@ -3,6 +3,7 @@ import { type EditorNextProps } from '../types/editor-props';
3
3
  export type FullPageEditorProps = Pick<EditorNextProps, 'preset' | 'defaultValue' | 'disabled' | 'mentionProvider' | 'contextIdentifierProvider' | 'searchProvider' | 'annotationProviders' | 'collabEditProvider' | 'collabEdit' | 'taskDecisionProvider' | 'extensionProviders' | 'shouldFocus' | 'performanceTracking' | 'quickInsert' | 'secondaryToolbarComponents' | 'featureFlags' | 'trackValidTransactions' | 'primaryToolbarComponents' | 'contextPanel' | 'contentComponents' | 'primaryToolbarIconBefore' | 'sanitizePrivateContent'> & {
4
4
  onChange?: () => void;
5
5
  onEditorReady?: () => void;
6
+ appearance: 'full-page' | 'full-width';
6
7
  };
7
8
  /**
8
9
  * Editor component based on `ComposableEditor` which sets the `appearance` to "full-page".
@@ -13,5 +13,6 @@ export type FullWidthEditorProps = Pick<EditorNextProps, 'preset' | 'defaultValu
13
13
  *
14
14
  * @param props FullWidthEditorProps
15
15
  * @returns Editor component
16
+ * @deprecated In favour of `FullPageEditor` with appearance "full-width"
16
17
  */
17
18
  export declare function FullWidthEditor(props: FullWidthEditorProps): JSX.Element;
@@ -1,2 +1,2 @@
1
- export { ToolbarSize, ToolbarWidths, ToolbarWidthsFullPage } from '@atlaskit/editor-common/types';
1
+ export { ToolbarSize, ToolbarWidths, ToolbarWidthsFullPage, ToolbarWidthsFullPageNext, } from '@atlaskit/editor-common/types';
2
2
  export type { ToolbarUiComponentFactoryParams, ToolbarUIComponentFactory, } from '@atlaskit/editor-common/types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "197.11.0",
3
+ "version": "197.12.0",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -43,12 +43,12 @@
43
43
  "@atlaskit/analytics-next": "^10.1.0",
44
44
  "@atlaskit/analytics-next-stable-react-context": "1.0.1",
45
45
  "@atlaskit/button": "^20.2.0",
46
- "@atlaskit/editor-common": "^91.0.0",
46
+ "@atlaskit/editor-common": "^91.1.0",
47
47
  "@atlaskit/editor-json-transformer": "^8.18.0",
48
48
  "@atlaskit/editor-plugin-quick-insert": "1.4.2",
49
49
  "@atlaskit/editor-plugins": "^5.3.0",
50
50
  "@atlaskit/editor-prosemirror": "6.0.0",
51
- "@atlaskit/editor-shared-styles": "^2.13.0",
51
+ "@atlaskit/editor-shared-styles": "^3.0.0",
52
52
  "@atlaskit/emoji": "^67.8.0",
53
53
  "@atlaskit/icon": "^22.18.0",
54
54
  "@atlaskit/media-card": "^78.5.0",
@@ -79,12 +79,12 @@
79
79
  "react-intl-next": "npm:react-intl@^5.18.1"
80
80
  },
81
81
  "devDependencies": {
82
- "@af/editor-examples-helpers": "0.3.12",
82
+ "@af/editor-examples-helpers": "0.3.13",
83
83
  "@af/editor-libra": "*",
84
84
  "@af/visual-regression": "*",
85
85
  "@atlaskit/adf-utils": "^19.8.0",
86
86
  "@atlaskit/analytics-listeners": "^8.11.0",
87
- "@atlaskit/collab-provider": "9.41.1",
87
+ "@atlaskit/collab-provider": "9.42.0",
88
88
  "@atlaskit/editor-plugin-annotation": "1.19.8",
89
89
  "@atlaskit/editor-plugin-card": "^3.2.0",
90
90
  "@atlaskit/editor-plugin-editor-viewmode": "^2.1.0",
@@ -96,7 +96,7 @@
96
96
  "@atlaskit/media-core": "^34.3.0",
97
97
  "@atlaskit/media-integration-test-helpers": "^3.1.0",
98
98
  "@atlaskit/media-test-helpers": "^34.4.0",
99
- "@atlaskit/modal-dialog": "^12.16.0",
99
+ "@atlaskit/modal-dialog": "^12.17.0",
100
100
  "@atlaskit/primitives": "^12.2.0",
101
101
  "@atlaskit/renderer": "^110.5.0",
102
102
  "@atlaskit/smart-card": "^28.2.0",
@@ -269,6 +269,9 @@
269
269
  "platform_editor_nest_in_quotes_adf_change": {
270
270
  "type": "boolean"
271
271
  },
272
+ "platform_editor_toolbar_responsive_fixes": {
273
+ "type": "boolean"
274
+ },
272
275
  "platform_editor_mark_boundary_cursor": {
273
276
  "type": "boolean"
274
277
  },