@atlaskit/editor-plugin-block-controls 9.1.15 → 9.1.17

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,20 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 9.1.17
4
+
5
+ ### Patch Changes
6
+
7
+ - [`73b2fc243f544`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/73b2fc243f544) -
8
+ Cleaning up getBrowserInfo which was behind experiment platform_editor_hydratable_ui and is now
9
+ rolled out
10
+ - Updated dependencies
11
+
12
+ ## 9.1.16
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+
3
18
  ## 9.1.15
4
19
 
5
20
  ### Patch Changes
@@ -306,7 +306,7 @@ var _apply = exports.apply = function apply(api, formatMessage, tr, currentState
306
306
  if (activeNode && (meta === null || meta === void 0 ? void 0 : meta.isDragging) !== true) {
307
307
  var _mappedRootPos$pos, _mappedRootPos;
308
308
  var _mappedPos;
309
- var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
309
+ var browser = (0, _browser.getBrowserInfo)();
310
310
  // In safari, when platform_editor_controls is on,
311
311
  // sometimes the drag handle for the layout disppears after you click on the handle for a few times
312
312
  // Which caused the drag handle onClick event not firing, then block menu wouldn't be opened
@@ -302,7 +302,7 @@ var selectedStyles = (0, _react2.css)({
302
302
  // icon span receives dragStart event, instead of button, and since it is not registered as a draggable element
303
303
  // with pragmatic DnD and pragmatic DnD is not triggered
304
304
  var handleIconDragStart = function handleIconDragStart(e) {
305
- var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
305
+ var browser = (0, _browser.getBrowserInfo)();
306
306
  if (!browser.chrome) {
307
307
  return;
308
308
  }
@@ -1071,7 +1071,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
1071
1071
  (0, _experiments.editorExperiment)('platform_editor_element_drag_and_drop_multiselect', true) && event.stopPropagation();
1072
1072
  };
1073
1073
  var hasHadInteraction = interactionState !== 'hasNotHadInteraction';
1074
- var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
1074
+ var browser = (0, _browser.getBrowserInfo)();
1075
1075
  var renderButton = function renderButton() {
1076
1076
  return (
1077
1077
  // eslint-disable-next-line @atlaskit/design-system/no-html-button
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.dragPreview = void 0;
8
8
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
9
9
  var _browser = require("@atlaskit/editor-common/browser");
10
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
11
10
  var previewStyle = {
12
11
  borderColor: "var(--ds-border, #0B120E24)",
13
12
  borderStyle: 'solid',
@@ -69,7 +68,7 @@ var createContentPreviewElement = function createContentPreviewElement(dom, node
69
68
  // Ignored via go/ees005
70
69
  // eslint-disable-next-line @atlaskit/editor/no-as-casting
71
70
  dom.cloneNode(true);
72
- var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
71
+ var browser = (0, _browser.getBrowserInfo)();
73
72
  clonedDom.style.marginLeft = '0';
74
73
  clonedDom.style.marginTop = nodeSpacing ? "".concat(nodeSpacing.top) : '0';
75
74
  clonedDom.style.marginRight = '0';
@@ -1,6 +1,6 @@
1
1
  import rafSchedule from 'raf-schd';
2
2
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
3
- import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
3
+ import { getBrowserInfo } from '@atlaskit/editor-common/browser';
4
4
  import { getNodeIdProvider } from '@atlaskit/editor-common/node-anchor';
5
5
  import { isMeasuring, startMeasure, stopMeasure } from '@atlaskit/editor-common/performance-measures';
6
6
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
@@ -297,7 +297,7 @@ export const apply = (api, formatMessage, tr, currentState, newState, flags, nod
297
297
  if (activeNode && (meta === null || meta === void 0 ? void 0 : meta.isDragging) !== true) {
298
298
  var _mappedRootPos$pos, _mappedRootPos;
299
299
  let mappedPos;
300
- const browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
300
+ const browser = getBrowserInfo();
301
301
  // In safari, when platform_editor_controls is on,
302
302
  // sometimes the drag handle for the layout disppears after you click on the handle for a few times
303
303
  // Which caused the drag handle onClick event not firing, then block menu wouldn't be opened
@@ -9,7 +9,7 @@ import { css, jsx } from '@emotion/react';
9
9
  import { bind } from 'bind-event-listener';
10
10
  import { getDocument } from '@atlaskit/browser-apis';
11
11
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
12
- import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
12
+ import { getBrowserInfo } from '@atlaskit/editor-common/browser';
13
13
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
14
14
  import { dragToMoveDown, dragToMoveLeft, dragToMoveRight, dragToMoveUp, getAriaKeyshortcuts, TooltipContentWithMultipleShortcuts } from '@atlaskit/editor-common/keymaps';
15
15
  import { blockControlsMessages } from '@atlaskit/editor-common/messages';
@@ -296,7 +296,7 @@ const selectedStyles = css({
296
296
  // icon span receives dragStart event, instead of button, and since it is not registered as a draggable element
297
297
  // with pragmatic DnD and pragmatic DnD is not triggered
298
298
  const handleIconDragStart = e => {
299
- const browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
299
+ const browser = getBrowserInfo();
300
300
  if (!browser.chrome) {
301
301
  return;
302
302
  }
@@ -1053,7 +1053,7 @@ export const DragHandle = ({
1053
1053
  editorExperiment('platform_editor_element_drag_and_drop_multiselect', true) && event.stopPropagation();
1054
1054
  };
1055
1055
  const hasHadInteraction = interactionState !== 'hasNotHadInteraction';
1056
- const browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
1056
+ const browser = getBrowserInfo();
1057
1057
  const renderButton = () =>
1058
1058
  // eslint-disable-next-line @atlaskit/design-system/no-html-button
1059
1059
  jsx("button", {
@@ -1,5 +1,4 @@
1
- import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
2
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
1
+ import { getBrowserInfo } from '@atlaskit/editor-common/browser';
3
2
  const previewStyle = {
4
3
  borderColor: "var(--ds-border, #0B120E24)",
5
4
  borderStyle: 'solid',
@@ -62,7 +61,7 @@ const createContentPreviewElement = (dom, nodeType, nodeSpacing) => {
62
61
  // Ignored via go/ees005
63
62
  // eslint-disable-next-line @atlaskit/editor/no-as-casting
64
63
  dom.cloneNode(true);
65
- const browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
64
+ const browser = getBrowserInfo();
66
65
  clonedDom.style.marginLeft = '0';
67
66
  clonedDom.style.marginTop = nodeSpacing ? `${nodeSpacing.top}` : '0';
68
67
  clonedDom.style.marginRight = '0';
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
6
6
  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) { _defineProperty(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; }
7
7
  import rafSchedule from 'raf-schd';
8
8
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
9
- import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
9
+ import { getBrowserInfo } from '@atlaskit/editor-common/browser';
10
10
  import { getNodeIdProvider } from '@atlaskit/editor-common/node-anchor';
11
11
  import { isMeasuring, startMeasure, stopMeasure } from '@atlaskit/editor-common/performance-measures';
12
12
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
@@ -299,7 +299,7 @@ var _apply = function apply(api, formatMessage, tr, currentState, newState, flag
299
299
  if (activeNode && (meta === null || meta === void 0 ? void 0 : meta.isDragging) !== true) {
300
300
  var _mappedRootPos$pos, _mappedRootPos;
301
301
  var _mappedPos;
302
- var browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
302
+ var browser = getBrowserInfo();
303
303
  // In safari, when platform_editor_controls is on,
304
304
  // sometimes the drag handle for the layout disppears after you click on the handle for a few times
305
305
  // Which caused the drag handle onClick event not firing, then block menu wouldn't be opened
@@ -14,7 +14,7 @@ import { css, jsx } from '@emotion/react';
14
14
  import { bind } from 'bind-event-listener';
15
15
  import { getDocument } from '@atlaskit/browser-apis';
16
16
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
17
- import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
17
+ import { getBrowserInfo } from '@atlaskit/editor-common/browser';
18
18
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
19
19
  import { dragToMoveDown, dragToMoveLeft, dragToMoveRight, dragToMoveUp, getAriaKeyshortcuts, TooltipContentWithMultipleShortcuts } from '@atlaskit/editor-common/keymaps';
20
20
  import { blockControlsMessages } from '@atlaskit/editor-common/messages';
@@ -298,7 +298,7 @@ var selectedStyles = css({
298
298
  // icon span receives dragStart event, instead of button, and since it is not registered as a draggable element
299
299
  // with pragmatic DnD and pragmatic DnD is not triggered
300
300
  var handleIconDragStart = function handleIconDragStart(e) {
301
- var browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
301
+ var browser = getBrowserInfo();
302
302
  if (!browser.chrome) {
303
303
  return;
304
304
  }
@@ -1067,7 +1067,7 @@ export var DragHandle = function DragHandle(_ref) {
1067
1067
  editorExperiment('platform_editor_element_drag_and_drop_multiselect', true) && event.stopPropagation();
1068
1068
  };
1069
1069
  var hasHadInteraction = interactionState !== 'hasNotHadInteraction';
1070
- var browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
1070
+ var browser = getBrowserInfo();
1071
1071
  var renderButton = function renderButton() {
1072
1072
  return (
1073
1073
  // eslint-disable-next-line @atlaskit/design-system/no-html-button
@@ -1,6 +1,5 @@
1
1
  import _typeof from "@babel/runtime/helpers/typeof";
2
- import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
3
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
2
+ import { getBrowserInfo } from '@atlaskit/editor-common/browser';
4
3
  var previewStyle = {
5
4
  borderColor: "var(--ds-border, #0B120E24)",
6
5
  borderStyle: 'solid',
@@ -62,7 +61,7 @@ var createContentPreviewElement = function createContentPreviewElement(dom, node
62
61
  // Ignored via go/ees005
63
62
  // eslint-disable-next-line @atlaskit/editor/no-as-casting
64
63
  dom.cloneNode(true);
65
- var browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
64
+ var browser = getBrowserInfo();
66
65
  clonedDom.style.marginLeft = '0';
67
66
  clonedDom.style.marginTop = nodeSpacing ? "".concat(nodeSpacing.top) : '0';
68
67
  clonedDom.style.marginRight = '0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "9.1.15",
3
+ "version": "9.1.17",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -47,8 +47,8 @@
47
47
  "@atlaskit/editor-prosemirror": "^7.3.0",
48
48
  "@atlaskit/editor-shared-styles": "^3.10.0",
49
49
  "@atlaskit/editor-tables": "^2.9.0",
50
- "@atlaskit/icon": "^34.0.0",
51
- "@atlaskit/icon-lab": "^6.4.0",
50
+ "@atlaskit/icon": "^34.1.0",
51
+ "@atlaskit/icon-lab": "^6.5.0",
52
52
  "@atlaskit/link": "^3.4.0",
53
53
  "@atlaskit/platform-feature-flags": "^1.1.0",
54
54
  "@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
@@ -56,7 +56,7 @@
56
56
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
57
57
  "@atlaskit/primitives": "^19.0.0",
58
58
  "@atlaskit/theme": "^23.0.0",
59
- "@atlaskit/tmp-editor-statsig": "^60.2.0",
59
+ "@atlaskit/tmp-editor-statsig": "^62.0.0",
60
60
  "@atlaskit/tokens": "^13.0.0",
61
61
  "@atlaskit/tooltip": "^21.1.0",
62
62
  "@babel/runtime": "^7.0.0",
@@ -67,7 +67,7 @@
67
67
  "uuid": "^3.1.0"
68
68
  },
69
69
  "peerDependencies": {
70
- "@atlaskit/editor-common": "^112.20.0",
70
+ "@atlaskit/editor-common": "^112.21.0",
71
71
  "react": "^18.2.0",
72
72
  "react-dom": "^18.2.0",
73
73
  "react-intl-next": "npm:react-intl@^5.18.1"