@atlaskit/editor-plugin-breakout 16.1.1 → 16.1.4

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,36 @@
1
1
  # @atlaskit/editor-plugin-breakout
2
2
 
3
+ ## 16.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 16.1.3
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 16.1.2
16
+
17
+ ### Patch Changes
18
+
19
+ - [`27143ffe51a5a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/27143ffe51a5a) -
20
+ `@atlaskit/editor-common/vanilla-tooltip` now exports `VANILLA_TOOLTIP_DEFAULT_CLASS`. Compose
21
+ tooltip class names from it rather than repeating the `ak-editor-vanilla-tooltip-default` literal.
22
+
23
+ Behind the `platform_editor_use_vanilla_components` experiment, `VanillaTooltip`:
24
+ - no longer throws `InvalidStateError` when shown again before its open delay has elapsed
25
+ - is `pointer-events: none`, so it cannot swallow pointer events meant for the content beneath —
26
+ pass `pointerEvents` in `styles` to opt out
27
+ - closes its popover before `destroy()` removes it from the document
28
+
29
+ Remaining changes are internal: tooltip consumers adopt the new constant, and the emoji tooltip
30
+ uses the shared class in place of an equivalent inline style object.
31
+
32
+ - Updated dependencies
33
+
3
34
  ## 16.1.1
4
35
 
5
36
  ### Patch Changes
@@ -86,11 +86,11 @@ var RailWithTooltip = function RailWithTooltip(_ref) {
86
86
  var TOOLTIP_CLASS_NAME = 'pm-breakout-resize-tooltip';
87
87
 
88
88
  /**
89
- * `ak-editor-vanilla-tooltip-default` opts into `vanillaTooltipDefaultStyles` in the
90
- * `EditorContentContainer` stylesheets, which still reaches a `[popover]` because it is painted in
91
- * the top layer but stays in the DOM under `.ProseMirror`.
89
+ * Classes applied to the tooltip element: the shared default look, plus our own hook. The default
90
+ * still reaches a `[popover]` because the tooltip is painted in the top layer but stays in the DOM
91
+ * under `.ProseMirror`.
92
92
  */
93
- var TOOLTIP_CLASS_NAMES = "ak-editor-vanilla-tooltip-default ".concat(TOOLTIP_CLASS_NAME);
93
+ var TOOLTIP_CLASS_NAMES = "".concat(_vanillaTooltip.VANILLA_TOOLTIP_DEFAULT_CLASS, " ").concat(TOOLTIP_CLASS_NAME);
94
94
 
95
95
  /**
96
96
  * Vanilla DOM equivalent of `RailWithTooltip`, behind `platform_editor_use_vanilla_components`.
@@ -112,11 +112,9 @@ var createHandleTooltip = function createHandleTooltip(_ref2) {
112
112
  // Let the tooltip generate its own id.
113
113
  undefined, TOOLTIP_CLASS_NAMES,
114
114
  // Default delay, matching the ADS tooltip.
115
- 300, {
116
- // The only thing the shared look does not cover. Already inherited from the anchor,
117
- // but set explicitly so a change there can never let this swallow a resize drag.
118
- pointerEvents: 'none'
119
- },
115
+ 300,
116
+ // No inline styles
117
+ undefined,
120
118
  // No `onShow`.
121
119
  undefined,
122
120
  // Below the cursor, matching the control arm's `position="mouse"`.
@@ -1,7 +1,7 @@
1
1
  import React, { useLayoutEffect, useState } from 'react';
2
2
  import { bind } from 'bind-event-listener';
3
3
  import { breakoutMessages as messages } from '@atlaskit/editor-common/messages';
4
- import { VanillaTooltip } from '@atlaskit/editor-common/vanilla-tooltip';
4
+ import { VANILLA_TOOLTIP_DEFAULT_CLASS, VanillaTooltip } from '@atlaskit/editor-common/vanilla-tooltip';
5
5
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
6
6
  import { draggable } from '@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter';
7
7
  import { disableNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/utils/disable-native-drag-preview';
@@ -73,11 +73,11 @@ const RailWithTooltip = ({
73
73
  const TOOLTIP_CLASS_NAME = 'pm-breakout-resize-tooltip';
74
74
 
75
75
  /**
76
- * `ak-editor-vanilla-tooltip-default` opts into `vanillaTooltipDefaultStyles` in the
77
- * `EditorContentContainer` stylesheets, which still reaches a `[popover]` because it is painted in
78
- * the top layer but stays in the DOM under `.ProseMirror`.
76
+ * Classes applied to the tooltip element: the shared default look, plus our own hook. The default
77
+ * still reaches a `[popover]` because the tooltip is painted in the top layer but stays in the DOM
78
+ * under `.ProseMirror`.
79
79
  */
80
- const TOOLTIP_CLASS_NAMES = `ak-editor-vanilla-tooltip-default ${TOOLTIP_CLASS_NAME}`;
80
+ const TOOLTIP_CLASS_NAMES = `${VANILLA_TOOLTIP_DEFAULT_CLASS} ${TOOLTIP_CLASS_NAME}`;
81
81
 
82
82
  /**
83
83
  * Vanilla DOM equivalent of `RailWithTooltip`, behind `platform_editor_use_vanilla_components`.
@@ -100,11 +100,9 @@ const createHandleTooltip = ({
100
100
  // Let the tooltip generate its own id.
101
101
  undefined, TOOLTIP_CLASS_NAMES,
102
102
  // Default delay, matching the ADS tooltip.
103
- 300, {
104
- // The only thing the shared look does not cover. Already inherited from the anchor,
105
- // but set explicitly so a change there can never let this swallow a resize drag.
106
- pointerEvents: 'none'
107
- },
103
+ 300,
104
+ // No inline styles
105
+ undefined,
108
106
  // No `onShow`.
109
107
  undefined,
110
108
  // Below the cursor, matching the control arm's `position="mouse"`.
@@ -3,7 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import React, { useLayoutEffect, useState } from 'react';
4
4
  import { bind } from 'bind-event-listener';
5
5
  import { breakoutMessages as messages } from '@atlaskit/editor-common/messages';
6
- import { VanillaTooltip } from '@atlaskit/editor-common/vanilla-tooltip';
6
+ import { VANILLA_TOOLTIP_DEFAULT_CLASS, VanillaTooltip } from '@atlaskit/editor-common/vanilla-tooltip';
7
7
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
8
8
  import { draggable } from '@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter';
9
9
  import { disableNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/utils/disable-native-drag-preview';
@@ -77,11 +77,11 @@ var RailWithTooltip = function RailWithTooltip(_ref) {
77
77
  var TOOLTIP_CLASS_NAME = 'pm-breakout-resize-tooltip';
78
78
 
79
79
  /**
80
- * `ak-editor-vanilla-tooltip-default` opts into `vanillaTooltipDefaultStyles` in the
81
- * `EditorContentContainer` stylesheets, which still reaches a `[popover]` because it is painted in
82
- * the top layer but stays in the DOM under `.ProseMirror`.
80
+ * Classes applied to the tooltip element: the shared default look, plus our own hook. The default
81
+ * still reaches a `[popover]` because the tooltip is painted in the top layer but stays in the DOM
82
+ * under `.ProseMirror`.
83
83
  */
84
- var TOOLTIP_CLASS_NAMES = "ak-editor-vanilla-tooltip-default ".concat(TOOLTIP_CLASS_NAME);
84
+ var TOOLTIP_CLASS_NAMES = "".concat(VANILLA_TOOLTIP_DEFAULT_CLASS, " ").concat(TOOLTIP_CLASS_NAME);
85
85
 
86
86
  /**
87
87
  * Vanilla DOM equivalent of `RailWithTooltip`, behind `platform_editor_use_vanilla_components`.
@@ -103,11 +103,9 @@ var createHandleTooltip = function createHandleTooltip(_ref2) {
103
103
  // Let the tooltip generate its own id.
104
104
  undefined, TOOLTIP_CLASS_NAMES,
105
105
  // Default delay, matching the ADS tooltip.
106
- 300, {
107
- // The only thing the shared look does not cover. Already inherited from the anchor,
108
- // but set explicitly so a change there can never let this swallow a resize drag.
109
- pointerEvents: 'none'
110
- },
106
+ 300,
107
+ // No inline styles
108
+ undefined,
111
109
  // No `onShow`.
112
110
  undefined,
113
111
  // Below the cursor, matching the control arm's `position="mouse"`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-breakout",
3
- "version": "16.1.1",
3
+ "version": "16.1.4",
4
4
  "description": "Breakout plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -22,7 +22,7 @@
22
22
  "atlaskit:src": "src/index.ts",
23
23
  "dependencies": {
24
24
  "@atlaskit/adf-schema": "^57.3.0",
25
- "@atlaskit/editor-plugin-block-controls": "^17.3.0",
25
+ "@atlaskit/editor-plugin-block-controls": "^17.4.0",
26
26
  "@atlaskit/editor-plugin-editor-disabled": "^16.1.0",
27
27
  "@atlaskit/editor-plugin-editor-viewmode": "^18.0.0",
28
28
  "@atlaskit/editor-plugin-guideline": "^16.1.0",
@@ -36,7 +36,7 @@
36
36
  "@atlaskit/platform-feature-flags": "^2.2.0",
37
37
  "@atlaskit/pragmatic-drag-and-drop": "^3.1.0",
38
38
  "@atlaskit/theme": "^28.2.0",
39
- "@atlaskit/tmp-editor-statsig": "^174.0.0",
39
+ "@atlaskit/tmp-editor-statsig": "^176.0.0",
40
40
  "@atlaskit/tokens": "^16.11.0",
41
41
  "@atlaskit/tooltip": "^24.3.0",
42
42
  "@babel/runtime": "^7.0.0",
@@ -46,7 +46,7 @@
46
46
  "uuid": "^11.1.1"
47
47
  },
48
48
  "peerDependencies": {
49
- "@atlaskit/editor-common": "^120.13.0",
49
+ "@atlaskit/editor-common": "^120.16.0",
50
50
  "react": "^18.2.0 || ^19.2.0",
51
51
  "react-dom": "^18.2.0 || ^19.2.0",
52
52
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"