@atlaskit/editor-plugin-layout 8.1.9 → 8.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/editor-plugin-layout
2
2
 
3
+ ## 8.1.11
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8ad443c7b22d0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8ad443c7b22d0) -
8
+ Support 'max' editor appearance for layout column resize handle when
9
+ platform_editor_layout_column_resize_handle experiment is enabled; guard column divider
10
+ decorations behind layout resizing plugin availability check
11
+ - Updated dependencies
12
+
13
+ ## 8.1.10
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
3
19
  ## 8.1.9
4
20
 
5
21
  ### Patch Changes
@@ -94,7 +94,7 @@ var layoutPlugin = exports.layoutPlugin = function layoutPlugin(_ref) {
94
94
  return (0, _main.default)(options);
95
95
  }
96
96
  }];
97
- if ((options.editorAppearance === 'full-page' || options.editorAppearance === 'full-width') && api && (0, _experiments.editorExperiment)('advanced_layouts', true)) {
97
+ if ((options.editorAppearance === 'full-page' || options.editorAppearance === 'full-width' || options.editorAppearance === 'max' && (0, _experiments.editorExperiment)('platform_editor_layout_column_resize_handle', true)) && api && (0, _experiments.editorExperiment)('advanced_layouts', true)) {
98
98
  plugins.push({
99
99
  name: 'layoutResizing',
100
100
  plugin: function plugin(_ref2) {
@@ -20,6 +20,7 @@ var _actions = require("./actions");
20
20
  var _columnResizeDivider = require("./column-resize-divider");
21
21
  var _consts = require("./consts");
22
22
  var _pluginKey = require("./plugin-key");
23
+ var _resizing = require("./resizing");
23
24
  var _utils3 = require("./utils");
24
25
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
25
26
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -142,7 +143,8 @@ var _default = exports.default = function _default(options) {
142
143
  props: {
143
144
  decorations: function decorations(state) {
144
145
  var layoutState = _pluginKey.pluginKey.getState(state);
145
- if ((0, _experiments.editorExperiment)('advanced_layouts', true) && (0, _experiments.editorExperiment)('platform_editor_layout_column_resize_handle', true)) {
146
+ var isLayoutResizingPluginAvailable = _resizing.pluginKey.get(state) !== undefined;
147
+ if ((0, _experiments.editorExperiment)('advanced_layouts', true) && (0, _experiments.editorExperiment)('platform_editor_layout_column_resize_handle', true) && isLayoutResizingPluginAvailable) {
146
148
  var dividerDecorations = (0, _columnResizeDivider.getColumnDividerDecorations)(state, editorViewRef);
147
149
  var selectedDecorations = layoutState.pos !== null ? getNodeDecoration(layoutState.pos, state.doc.nodeAt(layoutState.pos)) : [];
148
150
  var allDecorations = [].concat((0, _toConsumableArray2.default)(selectedDecorations), (0, _toConsumableArray2.default)(dividerDecorations));
@@ -85,7 +85,7 @@ export const layoutPlugin = ({
85
85
  name: 'layout',
86
86
  plugin: () => createLayoutPlugin(options)
87
87
  }];
88
- if ((options.editorAppearance === 'full-page' || options.editorAppearance === 'full-width') && api && editorExperiment('advanced_layouts', true)) {
88
+ if ((options.editorAppearance === 'full-page' || options.editorAppearance === 'full-width' || options.editorAppearance === 'max' && editorExperiment('platform_editor_layout_column_resize_handle', true)) && api && editorExperiment('advanced_layouts', true)) {
89
89
  plugins.push({
90
90
  name: 'layoutResizing',
91
91
  plugin: ({
@@ -11,6 +11,7 @@ import { fixColumnSizes, fixColumnStructure, getSelectedLayout } from './actions
11
11
  import { getColumnDividerDecorations } from './column-resize-divider';
12
12
  import { EVEN_DISTRIBUTED_COL_WIDTHS } from './consts';
13
13
  import { pluginKey } from './plugin-key';
14
+ import { pluginKey as layoutResizingPluginKey } from './resizing';
14
15
  import { getMaybeLayoutSection } from './utils';
15
16
  export const DEFAULT_LAYOUT = 'two_equal';
16
17
  const isWholeSelectionInsideLayoutColumn = state => {
@@ -136,7 +137,8 @@ export default (options => {
136
137
  props: {
137
138
  decorations(state) {
138
139
  const layoutState = pluginKey.getState(state);
139
- if (editorExperiment('advanced_layouts', true) && editorExperiment('platform_editor_layout_column_resize_handle', true)) {
140
+ const isLayoutResizingPluginAvailable = layoutResizingPluginKey.get(state) !== undefined;
141
+ if (editorExperiment('advanced_layouts', true) && editorExperiment('platform_editor_layout_column_resize_handle', true) && isLayoutResizingPluginAvailable) {
140
142
  const dividerDecorations = getColumnDividerDecorations(state, editorViewRef);
141
143
  const selectedDecorations = layoutState.pos !== null ? getNodeDecoration(layoutState.pos, state.doc.nodeAt(layoutState.pos)) : [];
142
144
  const allDecorations = [...selectedDecorations, ...dividerDecorations];
@@ -88,7 +88,7 @@ export var layoutPlugin = function layoutPlugin(_ref) {
88
88
  return createLayoutPlugin(options);
89
89
  }
90
90
  }];
91
- if ((options.editorAppearance === 'full-page' || options.editorAppearance === 'full-width') && api && editorExperiment('advanced_layouts', true)) {
91
+ if ((options.editorAppearance === 'full-page' || options.editorAppearance === 'full-width' || options.editorAppearance === 'max' && editorExperiment('platform_editor_layout_column_resize_handle', true)) && api && editorExperiment('advanced_layouts', true)) {
92
92
  plugins.push({
93
93
  name: 'layoutResizing',
94
94
  plugin: function plugin(_ref2) {
@@ -15,6 +15,7 @@ import { fixColumnSizes, fixColumnStructure, getSelectedLayout } from './actions
15
15
  import { getColumnDividerDecorations } from './column-resize-divider';
16
16
  import { EVEN_DISTRIBUTED_COL_WIDTHS } from './consts';
17
17
  import { pluginKey } from './plugin-key';
18
+ import { pluginKey as layoutResizingPluginKey } from './resizing';
18
19
  import { getMaybeLayoutSection } from './utils';
19
20
  export var DEFAULT_LAYOUT = 'two_equal';
20
21
  var isWholeSelectionInsideLayoutColumn = function isWholeSelectionInsideLayoutColumn(state) {
@@ -135,7 +136,8 @@ export default (function (options) {
135
136
  props: {
136
137
  decorations: function decorations(state) {
137
138
  var layoutState = pluginKey.getState(state);
138
- if (editorExperiment('advanced_layouts', true) && editorExperiment('platform_editor_layout_column_resize_handle', true)) {
139
+ var isLayoutResizingPluginAvailable = layoutResizingPluginKey.get(state) !== undefined;
140
+ if (editorExperiment('advanced_layouts', true) && editorExperiment('platform_editor_layout_column_resize_handle', true) && isLayoutResizingPluginAvailable) {
139
141
  var dividerDecorations = getColumnDividerDecorations(state, editorViewRef);
140
142
  var selectedDecorations = layoutState.pos !== null ? getNodeDecoration(layoutState.pos, state.doc.nodeAt(layoutState.pos)) : [];
141
143
  var allDecorations = [].concat(_toConsumableArray(selectedDecorations), _toConsumableArray(dividerDecorations));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-layout",
3
- "version": "8.1.9",
3
+ "version": "8.1.11",
4
4
  "description": "Layout plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -43,17 +43,17 @@
43
43
  "@atlaskit/editor-prosemirror": "^7.3.0",
44
44
  "@atlaskit/editor-shared-styles": "^3.10.0",
45
45
  "@atlaskit/editor-toolbar": "^0.20.0",
46
- "@atlaskit/icon": "^34.0.0",
47
- "@atlaskit/icon-lab": "^6.4.0",
46
+ "@atlaskit/icon": "^34.1.0",
47
+ "@atlaskit/icon-lab": "^6.5.0",
48
48
  "@atlaskit/platform-feature-flags": "^1.1.0",
49
- "@atlaskit/tmp-editor-statsig": "^61.0.0",
49
+ "@atlaskit/tmp-editor-statsig": "^62.1.0",
50
50
  "@atlaskit/tokens": "^13.0.0",
51
51
  "@babel/runtime": "^7.0.0",
52
52
  "@emotion/react": "^11.7.1",
53
53
  "bind-event-listener": "^3.0.0"
54
54
  },
55
55
  "peerDependencies": {
56
- "@atlaskit/editor-common": "^112.20.0",
56
+ "@atlaskit/editor-common": "^112.21.0",
57
57
  "react": "^18.2.0",
58
58
  "react-intl-next": "npm:react-intl@^5.18.1"
59
59
  },