@atlaskit/editor-common 107.7.2 → 107.7.3

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-common
2
2
 
3
+ ## 107.7.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#183109](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/183109)
8
+ [`3fd4ff5c71ef7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3fd4ff5c71ef7) -
9
+ Migrate to useSharedPluginStateWithSelector
10
+ - Updated dependencies
11
+
3
12
  ## 107.7.2
4
13
 
5
14
  ### Patch Changes
@@ -14,7 +14,6 @@ var _react2 = require("@emotion/react");
14
14
  var _classnames2 = _interopRequireDefault(require("classnames"));
15
15
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
16
  var _hooks = require("../../../hooks");
17
- var _useSharedPluginStateSelector = require("../../../hooks/useSharedPluginStateSelector/useSharedPluginStateSelector");
18
17
  var _ui = require("../../../ui");
19
18
  var _utils = require("../../../utils");
20
19
  var _LegacyContentHeader = require("../LegacyContentHeader");
@@ -219,22 +218,29 @@ function ExtensionWithPluginState(props) {
219
218
  }))))));
220
219
  }
221
220
  var useExtensionSharedPluginState = (0, _hooks.sharedPluginStateHookMigratorFactory)(function (pluginInjectionApi) {
222
- var _widthState$width;
223
- var _useSharedPluginState = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['width']),
224
- widthState = _useSharedPluginState.widthState;
221
+ var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(pluginInjectionApi, ['width'], function (states) {
222
+ var _states$widthState$wi, _states$widthState, _states$widthState2;
223
+ return {
224
+ width: (_states$widthState$wi = (_states$widthState = states.widthState) === null || _states$widthState === void 0 ? void 0 : _states$widthState.width) !== null && _states$widthState$wi !== void 0 ? _states$widthState$wi : 0,
225
+ lineLength: (_states$widthState2 = states.widthState) === null || _states$widthState2 === void 0 ? void 0 : _states$widthState2.lineLength
226
+ };
227
+ }),
228
+ lineLength = _useSharedPluginState.lineLength,
229
+ width = _useSharedPluginState.width;
225
230
  return {
226
231
  widthState: {
227
- width: (_widthState$width = widthState === null || widthState === void 0 ? void 0 : widthState.width) !== null && _widthState$width !== void 0 ? _widthState$width : 0,
228
- lineLength: widthState === null || widthState === void 0 ? void 0 : widthState.lineLength
232
+ width: width !== null && width !== void 0 ? width : 0,
233
+ lineLength: lineLength
229
234
  }
230
235
  };
231
236
  }, function (pluginInjectionApi) {
232
- var width = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(pluginInjectionApi, 'width.width');
233
- var lineLength = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(pluginInjectionApi, 'width.lineLength');
237
+ var _widthState$width;
238
+ var _useSharedPluginState2 = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['width']),
239
+ widthState = _useSharedPluginState2.widthState;
234
240
  return {
235
241
  widthState: {
236
- width: width !== null && width !== void 0 ? width : 0,
237
- lineLength: lineLength
242
+ width: (_widthState$width = widthState === null || widthState === void 0 ? void 0 : widthState.width) !== null && _widthState$width !== void 0 ? _widthState$width : 0,
243
+ lineLength: widthState === null || widthState === void 0 ? void 0 : widthState.lineLength
238
244
  }
239
245
  };
240
246
  });
@@ -11,7 +11,6 @@ var _react2 = require("@emotion/react");
11
11
  var _classnames = _interopRequireDefault(require("classnames"));
12
12
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
13
13
  var _hooks = require("../../../hooks");
14
- var _useSharedPluginStateSelector = require("../../../hooks/useSharedPluginStateSelector/useSharedPluginStateSelector");
15
14
  var _ui = require("../../../ui");
16
15
  var _Lozenge = _interopRequireDefault(require("../Lozenge"));
17
16
  var _styles = require("../styles");
@@ -25,18 +24,24 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
25
24
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
25
 
27
26
  var useInlineExtensionSharedPluginState = (0, _hooks.sharedPluginStateHookMigratorFactory)(function (pluginInjectionApi) {
28
- var _useSharedPluginState = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['width']),
29
- widthState = _useSharedPluginState.widthState;
27
+ var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(pluginInjectionApi, ['width'], function (states) {
28
+ var _states$widthState;
29
+ return {
30
+ width: (_states$widthState = states.widthState) === null || _states$widthState === void 0 ? void 0 : _states$widthState.width
31
+ };
32
+ }),
33
+ width = _useSharedPluginState.width;
30
34
  return {
31
35
  widthState: {
32
- width: widthState === null || widthState === void 0 ? void 0 : widthState.width
36
+ width: width
33
37
  }
34
38
  };
35
39
  }, function (pluginInjectionApi) {
36
- var width = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(pluginInjectionApi, 'width.width');
40
+ var _useSharedPluginState2 = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['width']),
41
+ widthState = _useSharedPluginState2.widthState;
37
42
  return {
38
43
  widthState: {
39
- width: width
44
+ width: widthState === null || widthState === void 0 ? void 0 : widthState.width
40
45
  }
41
46
  };
42
47
  });
@@ -16,7 +16,6 @@ var _react2 = require("@emotion/react");
16
16
  var _classnames = _interopRequireDefault(require("classnames"));
17
17
  var _fileEditorFile = _interopRequireDefault(require("@atlaskit/icon/core/migration/file--editor-file"));
18
18
  var _hooks = require("../../hooks");
19
- var _useSharedPluginStateSelector = require("../../hooks/useSharedPluginStateSelector/useSharedPluginStateSelector");
20
19
  var _MultiBodiedExtension = require("../../ui/MultiBodiedExtension");
21
20
  var _utils = require("../../utils");
22
21
  var _Lozenge = _interopRequireDefault(require("../Extension/Lozenge"));
@@ -241,20 +240,27 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref2
241
240
  }, extensionHandlerResult), childrenContainer))));
242
241
  };
243
242
  var useMultiBodyExtensionSharedPluginState = (0, _hooks.sharedPluginStateHookMigratorFactory)(function (pluginInjectionApi) {
244
- var _useSharedPluginState = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['width']),
245
- widthState = _useSharedPluginState.widthState;
246
- return {
247
- widthState: widthState
248
- };
249
- }, function (pluginInjectionApi) {
250
- var width = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(pluginInjectionApi, 'width.width');
251
- var lineLength = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(pluginInjectionApi, 'width.lineLength');
243
+ var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(pluginInjectionApi, ['width'], function (states) {
244
+ var _states$widthState, _states$widthState2;
245
+ return {
246
+ width: (_states$widthState = states.widthState) === null || _states$widthState === void 0 ? void 0 : _states$widthState.width,
247
+ lineLength: (_states$widthState2 = states.widthState) === null || _states$widthState2 === void 0 ? void 0 : _states$widthState2.lineLength
248
+ };
249
+ }),
250
+ width = _useSharedPluginState.width,
251
+ lineLength = _useSharedPluginState.lineLength;
252
252
  return {
253
253
  widthState: width === undefined ? undefined : {
254
254
  width: width,
255
255
  lineLength: lineLength
256
256
  }
257
257
  };
258
+ }, function (pluginInjectionApi) {
259
+ var _useSharedPluginState2 = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['width']),
260
+ widthState = _useSharedPluginState2.widthState;
261
+ return {
262
+ widthState: widthState
263
+ };
258
264
  });
259
265
  var MultiBodiedExtension = function MultiBodiedExtension(props) {
260
266
  var pluginInjectionApi = props.pluginInjectionApi;
@@ -16,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
16
16
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
17
17
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
18
18
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
19
- var packageVersion = "107.7.1";
19
+ var packageVersion = "107.7.2";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // Ignored via go/ees007
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
23
23
  * @jsx jsx
24
24
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
25
  var packageName = "@atlaskit/editor-common";
26
- var packageVersion = "107.7.1";
26
+ var packageVersion = "107.7.2";
27
27
  var halfFocusRing = 1;
28
28
  var dropOffset = '0, 8';
29
29
  // Ignored via go/ees005
@@ -10,8 +10,7 @@ import React, { Fragment } from 'react';
10
10
  import { jsx } from '@emotion/react';
11
11
  import classnames from 'classnames';
12
12
  import { fg } from '@atlaskit/platform-feature-flags';
13
- import { sharedPluginStateHookMigratorFactory, useSharedPluginState } from '../../../hooks';
14
- import { useSharedPluginStateSelector } from '../../../hooks/useSharedPluginStateSelector/useSharedPluginStateSelector';
13
+ import { sharedPluginStateHookMigratorFactory, useSharedPluginState, useSharedPluginStateWithSelector } from '../../../hooks';
15
14
  import { overflowShadow } from '../../../ui';
16
15
  import { calculateBreakoutStyles } from '../../../utils';
17
16
  import { LegacyContentHeader } from '../LegacyContentHeader';
@@ -211,23 +210,31 @@ function ExtensionWithPluginState(props) {
211
210
  }))))));
212
211
  }
213
212
  const useExtensionSharedPluginState = sharedPluginStateHookMigratorFactory(pluginInjectionApi => {
214
- var _widthState$width;
215
213
  const {
216
- widthState
217
- } = useSharedPluginState(pluginInjectionApi, ['width']);
214
+ lineLength,
215
+ width
216
+ } = useSharedPluginStateWithSelector(pluginInjectionApi, ['width'], states => {
217
+ var _states$widthState$wi, _states$widthState, _states$widthState2;
218
+ return {
219
+ width: (_states$widthState$wi = (_states$widthState = states.widthState) === null || _states$widthState === void 0 ? void 0 : _states$widthState.width) !== null && _states$widthState$wi !== void 0 ? _states$widthState$wi : 0,
220
+ lineLength: (_states$widthState2 = states.widthState) === null || _states$widthState2 === void 0 ? void 0 : _states$widthState2.lineLength
221
+ };
222
+ });
218
223
  return {
219
224
  widthState: {
220
- width: (_widthState$width = widthState === null || widthState === void 0 ? void 0 : widthState.width) !== null && _widthState$width !== void 0 ? _widthState$width : 0,
221
- lineLength: widthState === null || widthState === void 0 ? void 0 : widthState.lineLength
225
+ width: width !== null && width !== void 0 ? width : 0,
226
+ lineLength
222
227
  }
223
228
  };
224
229
  }, pluginInjectionApi => {
225
- const width = useSharedPluginStateSelector(pluginInjectionApi, 'width.width');
226
- const lineLength = useSharedPluginStateSelector(pluginInjectionApi, 'width.lineLength');
230
+ var _widthState$width;
231
+ const {
232
+ widthState
233
+ } = useSharedPluginState(pluginInjectionApi, ['width']);
227
234
  return {
228
235
  widthState: {
229
- width: width !== null && width !== void 0 ? width : 0,
230
- lineLength
236
+ width: (_widthState$width = widthState === null || widthState === void 0 ? void 0 : widthState.width) !== null && _widthState$width !== void 0 ? _widthState$width : 0,
237
+ lineLength: widthState === null || widthState === void 0 ? void 0 : widthState.lineLength
231
238
  }
232
239
  };
233
240
  });
@@ -8,26 +8,32 @@ import React, { Fragment } from 'react';
8
8
  import { jsx } from '@emotion/react';
9
9
  import classnames from 'classnames';
10
10
  import { akEditorGutterPaddingDynamic } from '@atlaskit/editor-shared-styles';
11
- import { sharedPluginStateHookMigratorFactory, useSharedPluginState } from '../../../hooks';
12
- import { useSharedPluginStateSelector } from '../../../hooks/useSharedPluginStateSelector/useSharedPluginStateSelector';
11
+ import { sharedPluginStateHookMigratorFactory, useSharedPluginState, useSharedPluginStateWithSelector } from '../../../hooks';
13
12
  import { createWidthContext, WidthContext } from '../../../ui';
14
13
  import ExtensionLozenge from '../Lozenge';
15
14
  import { overlay } from '../styles';
16
15
  import { inlineWrapperStyles, wrapperStyle } from './styles';
17
16
  const useInlineExtensionSharedPluginState = sharedPluginStateHookMigratorFactory(pluginInjectionApi => {
18
17
  const {
19
- widthState
20
- } = useSharedPluginState(pluginInjectionApi, ['width']);
18
+ width
19
+ } = useSharedPluginStateWithSelector(pluginInjectionApi, ['width'], states => {
20
+ var _states$widthState;
21
+ return {
22
+ width: (_states$widthState = states.widthState) === null || _states$widthState === void 0 ? void 0 : _states$widthState.width
23
+ };
24
+ });
21
25
  return {
22
26
  widthState: {
23
- width: widthState === null || widthState === void 0 ? void 0 : widthState.width
27
+ width
24
28
  }
25
29
  };
26
30
  }, pluginInjectionApi => {
27
- const width = useSharedPluginStateSelector(pluginInjectionApi, 'width.width');
31
+ const {
32
+ widthState
33
+ } = useSharedPluginState(pluginInjectionApi, ['width']);
28
34
  return {
29
35
  widthState: {
30
- width
36
+ width: widthState === null || widthState === void 0 ? void 0 : widthState.width
31
37
  }
32
38
  };
33
39
  });
@@ -11,8 +11,7 @@ import React, { Fragment, useState } from 'react';
11
11
  import { css, jsx } from '@emotion/react';
12
12
  import classnames from 'classnames';
13
13
  import EditorFileIcon from '@atlaskit/icon/core/migration/file--editor-file';
14
- import { sharedPluginStateHookMigratorFactory, useSharedPluginState } from '../../hooks';
15
- import { useSharedPluginStateSelector } from '../../hooks/useSharedPluginStateSelector/useSharedPluginStateSelector';
14
+ import { sharedPluginStateHookMigratorFactory, useSharedPluginState, useSharedPluginStateWithSelector } from '../../hooks';
16
15
  import { removeMarginsAndBorder, sharedMultiBodiedExtensionStyles } from '../../ui/MultiBodiedExtension';
17
16
  import { calculateBreakoutStyles, getExtensionLozengeData } from '../../utils';
18
17
  import ExtensionLozenge from '../Extension/Lozenge';
@@ -229,20 +228,28 @@ const MultiBodiedExtensionWithWidth = ({
229
228
  };
230
229
  const useMultiBodyExtensionSharedPluginState = sharedPluginStateHookMigratorFactory(pluginInjectionApi => {
231
230
  const {
232
- widthState
233
- } = useSharedPluginState(pluginInjectionApi, ['width']);
234
- return {
235
- widthState
236
- };
237
- }, pluginInjectionApi => {
238
- const width = useSharedPluginStateSelector(pluginInjectionApi, 'width.width');
239
- const lineLength = useSharedPluginStateSelector(pluginInjectionApi, 'width.lineLength');
231
+ width,
232
+ lineLength
233
+ } = useSharedPluginStateWithSelector(pluginInjectionApi, ['width'], states => {
234
+ var _states$widthState, _states$widthState2;
235
+ return {
236
+ width: (_states$widthState = states.widthState) === null || _states$widthState === void 0 ? void 0 : _states$widthState.width,
237
+ lineLength: (_states$widthState2 = states.widthState) === null || _states$widthState2 === void 0 ? void 0 : _states$widthState2.lineLength
238
+ };
239
+ });
240
240
  return {
241
241
  widthState: width === undefined ? undefined : {
242
242
  width,
243
243
  lineLength
244
244
  }
245
245
  };
246
+ }, pluginInjectionApi => {
247
+ const {
248
+ widthState
249
+ } = useSharedPluginState(pluginInjectionApi, ['width']);
250
+ return {
251
+ widthState
252
+ };
246
253
  });
247
254
  const MultiBodiedExtension = props => {
248
255
  const {
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "107.7.1";
4
+ const packageVersion = "107.7.2";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // Ignored via go/ees007
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "107.7.1";
16
+ const packageVersion = "107.7.2";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  // Ignored via go/ees005
@@ -15,8 +15,7 @@ import React, { Fragment } from 'react';
15
15
  import { jsx } from '@emotion/react';
16
16
  import classnames from 'classnames';
17
17
  import { fg } from '@atlaskit/platform-feature-flags';
18
- import { sharedPluginStateHookMigratorFactory, useSharedPluginState } from '../../../hooks';
19
- import { useSharedPluginStateSelector } from '../../../hooks/useSharedPluginStateSelector/useSharedPluginStateSelector';
18
+ import { sharedPluginStateHookMigratorFactory, useSharedPluginState, useSharedPluginStateWithSelector } from '../../../hooks';
20
19
  import { overflowShadow } from '../../../ui';
21
20
  import { calculateBreakoutStyles } from '../../../utils';
22
21
  import { LegacyContentHeader } from '../LegacyContentHeader';
@@ -212,22 +211,29 @@ function ExtensionWithPluginState(props) {
212
211
  }))))));
213
212
  }
214
213
  var useExtensionSharedPluginState = sharedPluginStateHookMigratorFactory(function (pluginInjectionApi) {
215
- var _widthState$width;
216
- var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['width']),
217
- widthState = _useSharedPluginState.widthState;
214
+ var _useSharedPluginState = useSharedPluginStateWithSelector(pluginInjectionApi, ['width'], function (states) {
215
+ var _states$widthState$wi, _states$widthState, _states$widthState2;
216
+ return {
217
+ width: (_states$widthState$wi = (_states$widthState = states.widthState) === null || _states$widthState === void 0 ? void 0 : _states$widthState.width) !== null && _states$widthState$wi !== void 0 ? _states$widthState$wi : 0,
218
+ lineLength: (_states$widthState2 = states.widthState) === null || _states$widthState2 === void 0 ? void 0 : _states$widthState2.lineLength
219
+ };
220
+ }),
221
+ lineLength = _useSharedPluginState.lineLength,
222
+ width = _useSharedPluginState.width;
218
223
  return {
219
224
  widthState: {
220
- width: (_widthState$width = widthState === null || widthState === void 0 ? void 0 : widthState.width) !== null && _widthState$width !== void 0 ? _widthState$width : 0,
221
- lineLength: widthState === null || widthState === void 0 ? void 0 : widthState.lineLength
225
+ width: width !== null && width !== void 0 ? width : 0,
226
+ lineLength: lineLength
222
227
  }
223
228
  };
224
229
  }, function (pluginInjectionApi) {
225
- var width = useSharedPluginStateSelector(pluginInjectionApi, 'width.width');
226
- var lineLength = useSharedPluginStateSelector(pluginInjectionApi, 'width.lineLength');
230
+ var _widthState$width;
231
+ var _useSharedPluginState2 = useSharedPluginState(pluginInjectionApi, ['width']),
232
+ widthState = _useSharedPluginState2.widthState;
227
233
  return {
228
234
  widthState: {
229
- width: width !== null && width !== void 0 ? width : 0,
230
- lineLength: lineLength
235
+ width: (_widthState$width = widthState === null || widthState === void 0 ? void 0 : widthState.width) !== null && _widthState$width !== void 0 ? _widthState$width : 0,
236
+ lineLength: widthState === null || widthState === void 0 ? void 0 : widthState.lineLength
231
237
  }
232
238
  };
233
239
  });
@@ -8,25 +8,30 @@ import React, { Fragment } from 'react';
8
8
  import { jsx } from '@emotion/react';
9
9
  import classnames from 'classnames';
10
10
  import { akEditorGutterPaddingDynamic } from '@atlaskit/editor-shared-styles';
11
- import { sharedPluginStateHookMigratorFactory, useSharedPluginState } from '../../../hooks';
12
- import { useSharedPluginStateSelector } from '../../../hooks/useSharedPluginStateSelector/useSharedPluginStateSelector';
11
+ import { sharedPluginStateHookMigratorFactory, useSharedPluginState, useSharedPluginStateWithSelector } from '../../../hooks';
13
12
  import { createWidthContext, WidthContext } from '../../../ui';
14
13
  import ExtensionLozenge from '../Lozenge';
15
14
  import { overlay } from '../styles';
16
15
  import { inlineWrapperStyles, wrapperStyle } from './styles';
17
16
  var useInlineExtensionSharedPluginState = sharedPluginStateHookMigratorFactory(function (pluginInjectionApi) {
18
- var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['width']),
19
- widthState = _useSharedPluginState.widthState;
17
+ var _useSharedPluginState = useSharedPluginStateWithSelector(pluginInjectionApi, ['width'], function (states) {
18
+ var _states$widthState;
19
+ return {
20
+ width: (_states$widthState = states.widthState) === null || _states$widthState === void 0 ? void 0 : _states$widthState.width
21
+ };
22
+ }),
23
+ width = _useSharedPluginState.width;
20
24
  return {
21
25
  widthState: {
22
- width: widthState === null || widthState === void 0 ? void 0 : widthState.width
26
+ width: width
23
27
  }
24
28
  };
25
29
  }, function (pluginInjectionApi) {
26
- var width = useSharedPluginStateSelector(pluginInjectionApi, 'width.width');
30
+ var _useSharedPluginState2 = useSharedPluginState(pluginInjectionApi, ['width']),
31
+ widthState = _useSharedPluginState2.widthState;
27
32
  return {
28
33
  widthState: {
29
- width: width
34
+ width: widthState === null || widthState === void 0 ? void 0 : widthState.width
30
35
  }
31
36
  };
32
37
  });
@@ -16,8 +16,7 @@ import React, { Fragment, useState } from 'react';
16
16
  import { css, jsx } from '@emotion/react';
17
17
  import classnames from 'classnames';
18
18
  import EditorFileIcon from '@atlaskit/icon/core/migration/file--editor-file';
19
- import { sharedPluginStateHookMigratorFactory, useSharedPluginState } from '../../hooks';
20
- import { useSharedPluginStateSelector } from '../../hooks/useSharedPluginStateSelector/useSharedPluginStateSelector';
19
+ import { sharedPluginStateHookMigratorFactory, useSharedPluginState, useSharedPluginStateWithSelector } from '../../hooks';
21
20
  import { removeMarginsAndBorder, sharedMultiBodiedExtensionStyles } from '../../ui/MultiBodiedExtension';
22
21
  import { calculateBreakoutStyles, getExtensionLozengeData } from '../../utils';
23
22
  import ExtensionLozenge from '../Extension/Lozenge';
@@ -234,20 +233,27 @@ var MultiBodiedExtensionWithWidth = function MultiBodiedExtensionWithWidth(_ref2
234
233
  }, extensionHandlerResult), childrenContainer))));
235
234
  };
236
235
  var useMultiBodyExtensionSharedPluginState = sharedPluginStateHookMigratorFactory(function (pluginInjectionApi) {
237
- var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['width']),
238
- widthState = _useSharedPluginState.widthState;
239
- return {
240
- widthState: widthState
241
- };
242
- }, function (pluginInjectionApi) {
243
- var width = useSharedPluginStateSelector(pluginInjectionApi, 'width.width');
244
- var lineLength = useSharedPluginStateSelector(pluginInjectionApi, 'width.lineLength');
236
+ var _useSharedPluginState = useSharedPluginStateWithSelector(pluginInjectionApi, ['width'], function (states) {
237
+ var _states$widthState, _states$widthState2;
238
+ return {
239
+ width: (_states$widthState = states.widthState) === null || _states$widthState === void 0 ? void 0 : _states$widthState.width,
240
+ lineLength: (_states$widthState2 = states.widthState) === null || _states$widthState2 === void 0 ? void 0 : _states$widthState2.lineLength
241
+ };
242
+ }),
243
+ width = _useSharedPluginState.width,
244
+ lineLength = _useSharedPluginState.lineLength;
245
245
  return {
246
246
  widthState: width === undefined ? undefined : {
247
247
  width: width,
248
248
  lineLength: lineLength
249
249
  }
250
250
  };
251
+ }, function (pluginInjectionApi) {
252
+ var _useSharedPluginState2 = useSharedPluginState(pluginInjectionApi, ['width']),
253
+ widthState = _useSharedPluginState2.widthState;
254
+ return {
255
+ widthState: widthState
256
+ };
251
257
  });
252
258
  var MultiBodiedExtension = function MultiBodiedExtension(props) {
253
259
  var pluginInjectionApi = props.pluginInjectionApi;
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "107.7.1";
10
+ var packageVersion = "107.7.2";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // Ignored via go/ees007
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
20
20
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import Layer from '../Layer';
22
22
  var packageName = "@atlaskit/editor-common";
23
- var packageVersion = "107.7.1";
23
+ var packageVersion = "107.7.2";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  // Ignored via go/ees005
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "107.7.2",
3
+ "version": "107.7.3",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -143,9 +143,9 @@
143
143
  "@atlaskit/icon": "^27.3.0",
144
144
  "@atlaskit/icon-object": "^7.1.0",
145
145
  "@atlaskit/link": "^3.2.0",
146
- "@atlaskit/link-datasource": "^4.12.0",
147
- "@atlaskit/link-picker": "^3.5.0",
148
- "@atlaskit/media-card": "^79.3.0",
146
+ "@atlaskit/link-datasource": "^4.13.0",
147
+ "@atlaskit/link-picker": "^3.6.0",
148
+ "@atlaskit/media-card": "^79.4.0",
149
149
  "@atlaskit/media-client": "^35.0.0",
150
150
  "@atlaskit/media-client-react": "^4.1.0",
151
151
  "@atlaskit/media-common": "^12.3.0",
@@ -163,14 +163,14 @@
163
163
  "@atlaskit/profilecard": "^23.21.0",
164
164
  "@atlaskit/react-ufo": "^3.14.0",
165
165
  "@atlaskit/section-message": "^8.2.0",
166
- "@atlaskit/smart-card": "^39.1.0",
166
+ "@atlaskit/smart-card": "^39.2.0",
167
167
  "@atlaskit/smart-user-picker": "^8.0.0",
168
168
  "@atlaskit/spinner": "^18.0.0",
169
169
  "@atlaskit/status": "^3.0.0",
170
170
  "@atlaskit/task-decision": "^19.2.0",
171
171
  "@atlaskit/textfield": "^8.0.0",
172
172
  "@atlaskit/theme": "^18.0.0",
173
- "@atlaskit/tmp-editor-statsig": "^9.0.0",
173
+ "@atlaskit/tmp-editor-statsig": "^9.1.0",
174
174
  "@atlaskit/tokens": "^5.4.0",
175
175
  "@atlaskit/tooltip": "^20.3.0",
176
176
  "@atlaskit/width-detector": "^5.0.0",