@atlaskit/editor-plugin-layout 6.2.5 → 6.2.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atlaskit/editor-plugin-layout
2
2
 
3
+ ## 6.2.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`4d676bbdb3ce6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4d676bbdb3ce6) -
8
+ ts-ignore added temporarily to unblock local consumption for help-center, will be removed once
9
+ project refs are setup
10
+ - Updated dependencies
11
+
3
12
  ## 6.2.5
4
13
 
5
14
  ### Patch Changes
@@ -88,6 +88,8 @@ var handleDeleteLayoutColumn = function handleDeleteLayoutColumn(state, dispatch
88
88
  return node.type.name === 'layoutSection';
89
89
  });
90
90
  if (parent) {
91
+ // @ts-ignore - Workaround for help-center local consumption
92
+
91
93
  var layoutSectionPos = tr.mapping.map(parent.pos);
92
94
  var layoutSectionNodeSize = parent.node.nodeSize;
93
95
  dispatch(state.tr.replaceWith(layoutSectionPos, layoutSectionPos + layoutSectionNodeSize, layoutContentFragment));
@@ -101,9 +103,13 @@ var _default = exports.default = function _default(options) {
101
103
  return new _safePlugin.SafePlugin({
102
104
  key: _pluginKey.pluginKey,
103
105
  state: {
106
+ // @ts-ignore - Workaround for help-center local consumption
107
+
104
108
  init: function init(_, state) {
105
109
  return getInitialPluginState(options, state);
106
110
  },
111
+ // @ts-ignore - Workaround for help-center local consumption
112
+
107
113
  apply: function apply(tr, pluginState, oldState, newState) {
108
114
  var _tr$getMeta, _pluginKey$getState;
109
115
  var isResizing = (0, _experiments.editorExperiment)('single_column_layouts', true) ? (_tr$getMeta = tr.getMeta('is-resizer-resizing')) !== null && _tr$getMeta !== void 0 ? _tr$getMeta : (_pluginKey$getState = _pluginKey.pluginKey.getState(oldState)) === null || _pluginKey$getState === void 0 ? void 0 : _pluginKey$getState.isResizing : false;
@@ -125,6 +131,7 @@ var _default = exports.default = function _default(options) {
125
131
  }
126
132
  },
127
133
  props: {
134
+ // @ts-ignore - Workaround for help-center local consumption
128
135
  decorations: function decorations(state) {
129
136
  var layoutState = _pluginKey.pluginKey.getState(state);
130
137
  if (layoutState.pos !== null) {
@@ -132,6 +139,8 @@ var _default = exports.default = function _default(options) {
132
139
  }
133
140
  return undefined;
134
141
  },
142
+ // @ts-ignore - Workaround for help-center local consumption
143
+
135
144
  handleKeyDown: (0, _keymap.keydownHandler)({
136
145
  Tab: (0, _utils.filterCommand)(isWholeSelectionInsideLayoutColumn, moveCursorToNextColumn),
137
146
  'Mod-Backspace': handleDeleteLayoutColumn,
@@ -148,13 +157,24 @@ var _default = exports.default = function _default(options) {
148
157
  }
149
158
  })
150
159
  },
160
+ // @ts-ignore - Workaround for help-center local consumption
161
+
151
162
  appendTransaction: function appendTransaction(transactions, _oldState, newState) {
152
163
  var changes = [];
164
+
165
+ // @ts-ignore - Workaround for help-center local consumption
166
+
153
167
  transactions.forEach(function (prevTr) {
154
168
  // remap change segments across the transaction set
169
+ // @ts-ignore - Workaround for help-center local consumption
170
+
155
171
  changes.forEach(function (change) {
156
172
  return {
173
+ // @ts-ignore - Workaround for help-center local consumption
174
+
157
175
  from: prevTr.mapping.map(change.from),
176
+ // @ts-ignore - Workaround for help-center local consumption
177
+
158
178
  to: prevTr.mapping.map(change.to),
159
179
  slice: change.slice
160
180
  };
@@ -185,6 +205,8 @@ var _default = exports.default = function _default(options) {
185
205
  if (changes.length) {
186
206
  var _tr = newState.tr;
187
207
  var selection = newState.selection.toJSON();
208
+ // @ts-ignore - Workaround for help-center local consumption
209
+
188
210
  changes.forEach(function (change) {
189
211
  _tr.replaceRange(change.from, change.to, change.slice);
190
212
  });
@@ -12,7 +12,11 @@ var _default = exports.default = function _default(options, pluginInjectionApi,
12
12
  return new _safePlugin.SafePlugin({
13
13
  key: pluginKey,
14
14
  props: {
15
+ // @ts-ignore - Workaround for help-center local consumption
16
+
15
17
  nodeViews: {
18
+ // @ts-ignore - Workaround for help-center local consumption
19
+
16
20
  layoutSection: function layoutSection(node, view, getPos) {
17
21
  return new _nodeviews.LayoutSectionView({
18
22
  node: node,
@@ -83,6 +83,8 @@ const handleDeleteLayoutColumn = (state, dispatch) => {
83
83
  return node.type.name === 'layoutSection';
84
84
  });
85
85
  if (parent) {
86
+ // @ts-ignore - Workaround for help-center local consumption
87
+
86
88
  const layoutSectionPos = tr.mapping.map(parent.pos);
87
89
  const layoutSectionNodeSize = parent.node.nodeSize;
88
90
  dispatch(state.tr.replaceWith(layoutSectionPos, layoutSectionPos + layoutSectionNodeSize, layoutContentFragment));
@@ -95,7 +97,11 @@ const handleDeleteLayoutColumn = (state, dispatch) => {
95
97
  export default (options => new SafePlugin({
96
98
  key: pluginKey,
97
99
  state: {
100
+ // @ts-ignore - Workaround for help-center local consumption
101
+
98
102
  init: (_, state) => getInitialPluginState(options, state),
103
+ // @ts-ignore - Workaround for help-center local consumption
104
+
99
105
  apply: (tr, pluginState, oldState, newState) => {
100
106
  var _tr$getMeta, _pluginKey$getState;
101
107
  const isResizing = editorExperiment('single_column_layouts', true) ? (_tr$getMeta = tr.getMeta('is-resizer-resizing')) !== null && _tr$getMeta !== void 0 ? _tr$getMeta : (_pluginKey$getState = pluginKey.getState(oldState)) === null || _pluginKey$getState === void 0 ? void 0 : _pluginKey$getState.isResizing : false;
@@ -119,6 +125,8 @@ export default (options => new SafePlugin({
119
125
  }
120
126
  },
121
127
  props: {
128
+ // @ts-ignore - Workaround for help-center local consumption
129
+
122
130
  decorations(state) {
123
131
  const layoutState = pluginKey.getState(state);
124
132
  if (layoutState.pos !== null) {
@@ -126,6 +134,8 @@ export default (options => new SafePlugin({
126
134
  }
127
135
  return undefined;
128
136
  },
137
+ // @ts-ignore - Workaround for help-center local consumption
138
+
129
139
  handleKeyDown: keydownHandler({
130
140
  Tab: filter(isWholeSelectionInsideLayoutColumn, moveCursorToNextColumn),
131
141
  'Mod-Backspace': handleDeleteLayoutColumn,
@@ -138,13 +148,24 @@ export default (options => new SafePlugin({
138
148
  getNodeSelectionPos: (state, nodePos) => state.doc.resolve(nodePos).before()
139
149
  })
140
150
  },
151
+ // @ts-ignore - Workaround for help-center local consumption
152
+
141
153
  appendTransaction: (transactions, _oldState, newState) => {
142
154
  const changes = [];
155
+
156
+ // @ts-ignore - Workaround for help-center local consumption
157
+
143
158
  transactions.forEach(prevTr => {
144
159
  // remap change segments across the transaction set
160
+ // @ts-ignore - Workaround for help-center local consumption
161
+
145
162
  changes.forEach(change => {
146
163
  return {
164
+ // @ts-ignore - Workaround for help-center local consumption
165
+
147
166
  from: prevTr.mapping.map(change.from),
167
+ // @ts-ignore - Workaround for help-center local consumption
168
+
148
169
  to: prevTr.mapping.map(change.to),
149
170
  slice: change.slice
150
171
  };
@@ -177,6 +198,8 @@ export default (options => new SafePlugin({
177
198
  if (changes.length) {
178
199
  let tr = newState.tr;
179
200
  const selection = newState.selection.toJSON();
201
+ // @ts-ignore - Workaround for help-center local consumption
202
+
180
203
  changes.forEach(change => {
181
204
  tr.replaceRange(change.from, change.to, change.slice);
182
205
  });
@@ -5,7 +5,11 @@ export const pluginKey = new PluginKey('layoutResizingPlugin');
5
5
  export default ((options, pluginInjectionApi, portalProviderAPI, eventDispatcher) => new SafePlugin({
6
6
  key: pluginKey,
7
7
  props: {
8
+ // @ts-ignore - Workaround for help-center local consumption
9
+
8
10
  nodeViews: {
11
+ // @ts-ignore - Workaround for help-center local consumption
12
+
9
13
  layoutSection: (node, view, getPos) => {
10
14
  return new LayoutSectionView({
11
15
  node,
@@ -81,6 +81,8 @@ var handleDeleteLayoutColumn = function handleDeleteLayoutColumn(state, dispatch
81
81
  return node.type.name === 'layoutSection';
82
82
  });
83
83
  if (parent) {
84
+ // @ts-ignore - Workaround for help-center local consumption
85
+
84
86
  var layoutSectionPos = tr.mapping.map(parent.pos);
85
87
  var layoutSectionNodeSize = parent.node.nodeSize;
86
88
  dispatch(state.tr.replaceWith(layoutSectionPos, layoutSectionPos + layoutSectionNodeSize, layoutContentFragment));
@@ -94,9 +96,13 @@ export default (function (options) {
94
96
  return new SafePlugin({
95
97
  key: pluginKey,
96
98
  state: {
99
+ // @ts-ignore - Workaround for help-center local consumption
100
+
97
101
  init: function init(_, state) {
98
102
  return getInitialPluginState(options, state);
99
103
  },
104
+ // @ts-ignore - Workaround for help-center local consumption
105
+
100
106
  apply: function apply(tr, pluginState, oldState, newState) {
101
107
  var _tr$getMeta, _pluginKey$getState;
102
108
  var isResizing = editorExperiment('single_column_layouts', true) ? (_tr$getMeta = tr.getMeta('is-resizer-resizing')) !== null && _tr$getMeta !== void 0 ? _tr$getMeta : (_pluginKey$getState = pluginKey.getState(oldState)) === null || _pluginKey$getState === void 0 ? void 0 : _pluginKey$getState.isResizing : false;
@@ -118,6 +124,7 @@ export default (function (options) {
118
124
  }
119
125
  },
120
126
  props: {
127
+ // @ts-ignore - Workaround for help-center local consumption
121
128
  decorations: function decorations(state) {
122
129
  var layoutState = pluginKey.getState(state);
123
130
  if (layoutState.pos !== null) {
@@ -125,6 +132,8 @@ export default (function (options) {
125
132
  }
126
133
  return undefined;
127
134
  },
135
+ // @ts-ignore - Workaround for help-center local consumption
136
+
128
137
  handleKeyDown: keydownHandler({
129
138
  Tab: filter(isWholeSelectionInsideLayoutColumn, moveCursorToNextColumn),
130
139
  'Mod-Backspace': handleDeleteLayoutColumn,
@@ -141,13 +150,24 @@ export default (function (options) {
141
150
  }
142
151
  })
143
152
  },
153
+ // @ts-ignore - Workaround for help-center local consumption
154
+
144
155
  appendTransaction: function appendTransaction(transactions, _oldState, newState) {
145
156
  var changes = [];
157
+
158
+ // @ts-ignore - Workaround for help-center local consumption
159
+
146
160
  transactions.forEach(function (prevTr) {
147
161
  // remap change segments across the transaction set
162
+ // @ts-ignore - Workaround for help-center local consumption
163
+
148
164
  changes.forEach(function (change) {
149
165
  return {
166
+ // @ts-ignore - Workaround for help-center local consumption
167
+
150
168
  from: prevTr.mapping.map(change.from),
169
+ // @ts-ignore - Workaround for help-center local consumption
170
+
151
171
  to: prevTr.mapping.map(change.to),
152
172
  slice: change.slice
153
173
  };
@@ -178,6 +198,8 @@ export default (function (options) {
178
198
  if (changes.length) {
179
199
  var _tr = newState.tr;
180
200
  var selection = newState.selection.toJSON();
201
+ // @ts-ignore - Workaround for help-center local consumption
202
+
181
203
  changes.forEach(function (change) {
182
204
  _tr.replaceRange(change.from, change.to, change.slice);
183
205
  });
@@ -6,7 +6,11 @@ export default (function (options, pluginInjectionApi, portalProviderAPI, eventD
6
6
  return new SafePlugin({
7
7
  key: pluginKey,
8
8
  props: {
9
+ // @ts-ignore - Workaround for help-center local consumption
10
+
9
11
  nodeViews: {
12
+ // @ts-ignore - Workaround for help-center local consumption
13
+
10
14
  layoutSection: function layoutSection(node, view, getPos) {
11
15
  return new LayoutSectionView({
12
16
  node: node,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-layout",
3
- "version": "6.2.5",
3
+ "version": "6.2.6",
4
4
  "description": "Layout plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -45,13 +45,13 @@
45
45
  "@atlaskit/icon": "^29.0.0",
46
46
  "@atlaskit/icon-lab": "^5.12.0",
47
47
  "@atlaskit/platform-feature-flags": "^1.1.0",
48
- "@atlaskit/tmp-editor-statsig": "^13.38.0",
49
- "@atlaskit/tokens": "^8.0.0",
48
+ "@atlaskit/tmp-editor-statsig": "^13.42.0",
49
+ "@atlaskit/tokens": "^8.3.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "@emotion/react": "^11.7.1"
52
52
  },
53
53
  "peerDependencies": {
54
- "@atlaskit/editor-common": "^110.32.0",
54
+ "@atlaskit/editor-common": "^110.34.0",
55
55
  "react": "^18.2.0",
56
56
  "react-intl-next": "npm:react-intl@^5.18.1"
57
57
  },