@atlaskit/editor-core 214.1.6 → 214.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 214.1.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [`bcc75f68099a1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bcc75f68099a1) -
8
+ upgrade browser util in editor-core
9
+ - Updated dependencies
10
+
3
11
  ## 214.1.6
4
12
 
5
13
  ### Patch Changes
@@ -40,6 +40,7 @@ var useShowKeyline = function useShowKeyline(contentAreaRef) {
40
40
  if (!((_contentAreaRef$curre = contentAreaRef.current) !== null && _contentAreaRef$curre !== void 0 && _contentAreaRef$curre.contentArea)) {
41
41
  return;
42
42
  }
43
+ var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
43
44
  var intersection = new IntersectionObserver(function (_ref) {
44
45
  var _ref2 = (0, _slicedToArray2.default)(_ref, 1),
45
46
  entry = _ref2[0];
@@ -50,7 +51,7 @@ var useShowKeyline = function useShowKeyline(contentAreaRef) {
50
51
  // to differences in IntersectionObserver behaviour between browsers.
51
52
  // By lowering the threshold a little it gives Safari more
52
53
  // time to catch these events.
53
- threshold: _browser.browser.safari ? 0.98 : 1
54
+ threshold: browser.safari ? 0.98 : 1
54
55
  });
55
56
  intersection.observe(contentAreaRef.current.contentArea);
56
57
  return function () {
@@ -107,6 +107,7 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
107
107
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
108
108
  '--ak-editor--large-gutter-padding': "".concat((0, _editorSharedStyles.akEditorGutterPaddingDynamic)(), "px")
109
109
  };
110
+ var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
110
111
  return (0, _react2.jsx)("div", {
111
112
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
112
113
  className: className,
@@ -305,7 +306,7 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
305
306
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
306
307
  _link.linkStyles,
307
308
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
308
- _browser.browser.safari && _list.listsStylesSafariFix, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_breakout_resizing', 'isEnabled', true) ? (0, _platformFeatureFlags.fg)('platform_editor_breakout_resizing_width_changes') ?
309
+ browser.safari && _list.listsStylesSafariFix, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_breakout_resizing', 'isEnabled', true) ? (0, _platformFeatureFlags.fg)('platform_editor_breakout_resizing_width_changes') ?
309
310
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
310
311
  _resizerStyles.pragmaticResizerStylesNew :
311
312
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -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 = "214.1.5";
8
+ var version = exports.version = "214.1.6";
@@ -6,7 +6,7 @@ import React, { useEffect, useMemo, useRef, useState } from 'react';
6
6
 
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
8
  import { jsx } from '@emotion/react';
9
- import { browser } from '@atlaskit/editor-common/browser';
9
+ import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
10
10
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
11
11
  import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
12
12
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
@@ -26,6 +26,7 @@ const useShowKeyline = contentAreaRef => {
26
26
  if (!((_contentAreaRef$curre = contentAreaRef.current) !== null && _contentAreaRef$curre !== void 0 && _contentAreaRef$curre.contentArea)) {
27
27
  return;
28
28
  }
29
+ const browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
29
30
  const intersection = new IntersectionObserver(([entry]) => {
30
31
  setShowKeyline(!entry.isIntersecting && entry.boundingClientRect.top < entry.intersectionRect.top);
31
32
  }, {
@@ -8,7 +8,7 @@ import React from 'react';
8
8
 
9
9
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
10
  import { jsx, useTheme } from '@emotion/react';
11
- import { browser } from '@atlaskit/editor-common/browser';
11
+ import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
12
12
  import { akEditorGutterPaddingDynamic, editorFontSize } from '@atlaskit/editor-shared-styles';
13
13
  import { fg } from '@atlaskit/platform-feature-flags';
14
14
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -102,6 +102,7 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
102
102
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
103
103
  '--ak-editor--large-gutter-padding': `${akEditorGutterPaddingDynamic()}px`
104
104
  };
105
+ const browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
105
106
  return jsx("div", {
106
107
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
107
108
  className: className,
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "214.1.5";
2
+ export const version = "214.1.6";
@@ -7,7 +7,7 @@ import React, { useEffect, useMemo, useRef, useState } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { jsx } from '@emotion/react';
10
- import { browser } from '@atlaskit/editor-common/browser';
10
+ import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
11
11
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
12
12
  import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
13
13
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
@@ -30,6 +30,7 @@ var useShowKeyline = function useShowKeyline(contentAreaRef) {
30
30
  if (!((_contentAreaRef$curre = contentAreaRef.current) !== null && _contentAreaRef$curre !== void 0 && _contentAreaRef$curre.contentArea)) {
31
31
  return;
32
32
  }
33
+ var browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
33
34
  var intersection = new IntersectionObserver(function (_ref) {
34
35
  var _ref2 = _slicedToArray(_ref, 1),
35
36
  entry = _ref2[0];
@@ -8,7 +8,7 @@ import React from 'react';
8
8
 
9
9
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
10
  import { jsx, useTheme } from '@emotion/react';
11
- import { browser } from '@atlaskit/editor-common/browser';
11
+ import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
12
12
  import { akEditorGutterPaddingDynamic, editorFontSize } from '@atlaskit/editor-shared-styles';
13
13
  import { fg } from '@atlaskit/platform-feature-flags';
14
14
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -99,6 +99,7 @@ var EditorContentContainer = /*#__PURE__*/React.forwardRef(function (props, ref)
99
99
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
100
100
  '--ak-editor--large-gutter-padding': "".concat(akEditorGutterPaddingDynamic(), "px")
101
101
  };
102
+ var browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
102
103
  return jsx("div", {
103
104
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
104
105
  className: className,
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "214.1.5";
2
+ export var version = "214.1.6";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "214.1.6",
3
+ "version": "214.1.7",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -64,7 +64,7 @@
64
64
  "@atlaskit/platform-feature-flags-react": "^0.3.0",
65
65
  "@atlaskit/react-ufo": "^4.11.0",
66
66
  "@atlaskit/task-decision": "^19.2.0",
67
- "@atlaskit/tmp-editor-statsig": "^13.2.0",
67
+ "@atlaskit/tmp-editor-statsig": "^13.4.0",
68
68
  "@atlaskit/tokens": "^6.4.0",
69
69
  "@atlaskit/tooltip": "^20.5.0",
70
70
  "@atlaskit/width-detector": "^5.0.0",
@@ -81,7 +81,7 @@
81
81
  "uuid": "^3.1.0"
82
82
  },
83
83
  "peerDependencies": {
84
- "@atlaskit/editor-common": "^110.5.0",
84
+ "@atlaskit/editor-common": "^110.7.0",
85
85
  "@atlaskit/link-provider": "^4.0.0",
86
86
  "@atlaskit/media-core": "^37.0.0",
87
87
  "react": "^18.2.0",