@atlaskit/editor-plugin-mentions 18.3.0 → 18.3.1

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,24 @@
1
1
  # @atlaskit/editor-plugin-mentions
2
2
 
3
+ ## 18.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`27143ffe51a5a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/27143ffe51a5a) -
8
+ `@atlaskit/editor-common/vanilla-tooltip` now exports `VANILLA_TOOLTIP_DEFAULT_CLASS`. Compose
9
+ tooltip class names from it rather than repeating the `ak-editor-vanilla-tooltip-default` literal.
10
+
11
+ Behind the `platform_editor_use_vanilla_components` experiment, `VanillaTooltip`:
12
+ - no longer throws `InvalidStateError` when shown again before its open delay has elapsed
13
+ - is `pointer-events: none`, so it cannot swallow pointer events meant for the content beneath —
14
+ pass `pointerEvents` in `styles` to opt out
15
+ - closes its popover before `destroy()` removes it from the document
16
+
17
+ Remaining changes are internal: tooltip consumers adopt the new constant, and the emoji tooltip
18
+ uses the shared class in place of an equivalent inline style object.
19
+
20
+ - Updated dependencies
21
+
3
22
  ## 18.3.0
4
23
 
5
24
  ### Minor Changes
@@ -31,12 +31,8 @@ var primitiveClassName = 'editor-mention-primitive';
31
31
  var primitiveWithAvatarClassName = 'editor-mention-primitive-with-avatar';
32
32
  var avatarContainerClassName = 'editor-mention-avatar';
33
33
  var mentionTextClassName = 'editor-mention-text';
34
- /**
35
- * Classes applied to the disabled-reason tooltip. `ak-editor-vanilla-tooltip-default` opts into
36
- * the shared `VanillaTooltip` look, defined as `vanillaTooltipDefaultStyles` in both
37
- * EditorContentContainer stylesheets — keep them in sync when renaming.
38
- */
39
- var disabledTooltipClassNames = 'ak-editor-vanilla-tooltip-default mention-disabled-tooltip';
34
+ /** Classes applied to the disabled-reason tooltip: the shared default look, plus our own hook. */
35
+ var disabledTooltipClassNames = "".concat(_vanillaTooltip.VANILLA_TOOLTIP_DEFAULT_CLASS, " mention-disabled-tooltip");
40
36
  var genericMentionIds = ['HipChat', 'all', 'here'];
41
37
  var unknownMentionText = "@".concat(_constants.UNKNOWN_USER_ID);
42
38
  // eslint-disable-next-line require-unicode-regexp
@@ -43,7 +43,7 @@ var ACTIONS = exports.ACTIONS = {
43
43
  CLEAR_PENDING_PASTED_AGENT_MENTION: 'CLEAR_PENDING_PASTED_AGENT_MENTION'
44
44
  };
45
45
  var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
46
- var PACKAGE_VERSION = "18.2.10";
46
+ var PACKAGE_VERSION = "18.3.0";
47
47
  var setProvider = function setProvider(provider) {
48
48
  return function (state, dispatch) {
49
49
  if (dispatch) {
@@ -1,7 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import { getBrowserInfo } from '@atlaskit/editor-common/browser';
3
3
  import { isSSR } from '@atlaskit/editor-common/core-utils';
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 { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace';
6
6
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
7
7
  // oxlint-disable-next-line import/no-duplicates
@@ -20,12 +20,8 @@ const primitiveClassName = 'editor-mention-primitive';
20
20
  const primitiveWithAvatarClassName = 'editor-mention-primitive-with-avatar';
21
21
  const avatarContainerClassName = 'editor-mention-avatar';
22
22
  const mentionTextClassName = 'editor-mention-text';
23
- /**
24
- * Classes applied to the disabled-reason tooltip. `ak-editor-vanilla-tooltip-default` opts into
25
- * the shared `VanillaTooltip` look, defined as `vanillaTooltipDefaultStyles` in both
26
- * EditorContentContainer stylesheets — keep them in sync when renaming.
27
- */
28
- const disabledTooltipClassNames = 'ak-editor-vanilla-tooltip-default mention-disabled-tooltip';
23
+ /** Classes applied to the disabled-reason tooltip: the shared default look, plus our own hook. */
24
+ const disabledTooltipClassNames = `${VANILLA_TOOLTIP_DEFAULT_CLASS} mention-disabled-tooltip`;
29
25
  const genericMentionIds = ['HipChat', 'all', 'here'];
30
26
  const unknownMentionText = `@${UNKNOWN_USER_ID}`;
31
27
  // eslint-disable-next-line require-unicode-regexp
@@ -32,7 +32,7 @@ export const ACTIONS = {
32
32
  CLEAR_PENDING_PASTED_AGENT_MENTION: 'CLEAR_PENDING_PASTED_AGENT_MENTION'
33
33
  };
34
34
  const PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
35
- const PACKAGE_VERSION = "18.2.10";
35
+ const PACKAGE_VERSION = "18.3.0";
36
36
  const setProvider = provider => (state, dispatch) => {
37
37
  if (dispatch) {
38
38
  dispatch(state.tr.setMeta(mentionPluginKey, {
@@ -7,7 +7,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
7
7
  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; }
8
8
  import { getBrowserInfo } from '@atlaskit/editor-common/browser';
9
9
  import { isSSR } from '@atlaskit/editor-common/core-utils';
10
- import { VanillaTooltip } from '@atlaskit/editor-common/vanilla-tooltip';
10
+ import { VANILLA_TOOLTIP_DEFAULT_CLASS, VanillaTooltip } from '@atlaskit/editor-common/vanilla-tooltip';
11
11
  import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/whitespace';
12
12
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
13
13
  // oxlint-disable-next-line import/no-duplicates
@@ -26,12 +26,8 @@ var primitiveClassName = 'editor-mention-primitive';
26
26
  var primitiveWithAvatarClassName = 'editor-mention-primitive-with-avatar';
27
27
  var avatarContainerClassName = 'editor-mention-avatar';
28
28
  var mentionTextClassName = 'editor-mention-text';
29
- /**
30
- * Classes applied to the disabled-reason tooltip. `ak-editor-vanilla-tooltip-default` opts into
31
- * the shared `VanillaTooltip` look, defined as `vanillaTooltipDefaultStyles` in both
32
- * EditorContentContainer stylesheets — keep them in sync when renaming.
33
- */
34
- var disabledTooltipClassNames = 'ak-editor-vanilla-tooltip-default mention-disabled-tooltip';
29
+ /** Classes applied to the disabled-reason tooltip: the shared default look, plus our own hook. */
30
+ var disabledTooltipClassNames = "".concat(VANILLA_TOOLTIP_DEFAULT_CLASS, " mention-disabled-tooltip");
35
31
  var genericMentionIds = ['HipChat', 'all', 'here'];
36
32
  var unknownMentionText = "@".concat(UNKNOWN_USER_ID);
37
33
  // eslint-disable-next-line require-unicode-regexp
@@ -35,7 +35,7 @@ export var ACTIONS = {
35
35
  CLEAR_PENDING_PASTED_AGENT_MENTION: 'CLEAR_PENDING_PASTED_AGENT_MENTION'
36
36
  };
37
37
  var PACKAGE_NAME = "@atlaskit/editor-plugin-mentions";
38
- var PACKAGE_VERSION = "18.2.10";
38
+ var PACKAGE_VERSION = "18.3.0";
39
39
  var setProvider = function setProvider(provider) {
40
40
  return function (state, dispatch) {
41
41
  if (dispatch) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-mentions",
3
- "version": "18.3.0",
3
+ "version": "18.3.1",
4
4
  "description": "Mentions plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -59,14 +59,14 @@
59
59
  "uuid": "^11.1.1"
60
60
  },
61
61
  "peerDependencies": {
62
- "@atlaskit/editor-common": "^120.14.0",
62
+ "@atlaskit/editor-common": "^120.15.0",
63
63
  "react": "^18.2.0 || ^19.2.0",
64
64
  "react-dom": "^18.2.0 || ^19.2.0",
65
65
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@atlaskit/button": "^25.3.0",
69
- "@atlaskit/editor-core": "^226.4.0",
69
+ "@atlaskit/editor-core": "^226.5.0",
70
70
  "@testing-library/react": "^16.3.0",
71
71
  "react": "^19.2.0",
72
72
  "react-dom": "^19.2.0",