@atlaskit/editor-plugin-emoji 17.2.2 → 17.2.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 +27 -0
- package/dist/cjs/nodeviews/EmojiNodeView.js +9 -3
- package/dist/cjs/nodeviews/emojiNodeSpec.js +2 -2
- package/dist/es2019/nodeviews/EmojiNodeView.js +9 -3
- package/dist/es2019/nodeviews/emojiNodeSpec.js +1 -1
- package/dist/esm/nodeviews/EmojiNodeView.js +9 -3
- package/dist/esm/nodeviews/emojiNodeSpec.js +1 -1
- package/dist/types/pm-plugins/providers/EmojiNodeDataProvider.d.ts +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-emoji
|
|
2
2
|
|
|
3
|
+
## 17.2.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 17.2.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`3ae04490ac0f4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3ae04490ac0f4) -
|
|
14
|
+
Render the disabled mention chip tooltip without React. Behind the
|
|
15
|
+
`platform_editor_use_vanilla_components` experiment, with no visual change.
|
|
16
|
+
- Disabled mention chips no longer mount a React tooltip, its portal, and the DOM-to-React event
|
|
17
|
+
bridge that fed it.
|
|
18
|
+
- Tooltips release their positioning instance when they close, rather than keeping one alive per
|
|
19
|
+
hovered chip.
|
|
20
|
+
- Tooltips remove their own element and attributes when destroyed, so mention and emoji chips no
|
|
21
|
+
longer leave orphaned popovers behind.
|
|
22
|
+
- Re-hovering a tooltip while it is closing keeps it open, matching `@atlaskit/tooltip`.
|
|
23
|
+
Previously the pending hide still landed and the tooltip disappeared under the pointer.
|
|
24
|
+
- Tooltips close when they hide, instead of waiting on a transition that nothing declares.
|
|
25
|
+
Required by the change above: releasing the positioning instance while the popover was still
|
|
26
|
+
open left it behind as an invisible hit target over the content.
|
|
27
|
+
|
|
28
|
+
- Updated dependencies
|
|
29
|
+
|
|
3
30
|
## 17.2.2
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
|
@@ -22,6 +22,7 @@ var _vanillaTooltip = require("@atlaskit/editor-common/vanilla-tooltip");
|
|
|
22
22
|
var _editorPluginConnectivity = require("@atlaskit/editor-plugin-connectivity");
|
|
23
23
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
24
24
|
var _emojiIdToEmoji = require("@atlaskit/emoji/emoji-id-to-emoji");
|
|
25
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
25
26
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
26
27
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
27
28
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
@@ -154,11 +155,16 @@ var EmojiNodeView = exports.EmojiNodeView = /*#__PURE__*/function () {
|
|
|
154
155
|
return (0, _createClass2.default)(EmojiNodeView, [{
|
|
155
156
|
key: "destroyTooltip",
|
|
156
157
|
value: function destroyTooltip() {
|
|
157
|
-
var _this$destroyLazyTool, _this$tooltipInstance
|
|
158
|
+
var _this$destroyLazyTool, _this$tooltipInstance;
|
|
158
159
|
(_this$destroyLazyTool = this.destroyLazyTooltipListeners) === null || _this$destroyLazyTool === void 0 || _this$destroyLazyTool.call(this);
|
|
159
160
|
(_this$tooltipInstance = this.tooltipInstance) === null || _this$tooltipInstance === void 0 || _this$tooltipInstance.destroy();
|
|
160
|
-
|
|
161
|
-
|
|
161
|
+
// with platform_editor_use_vanilla_components the tooltipInstance?.destroy()
|
|
162
|
+
// will remove the popovertarget and aria-describedby attributes from the tooltipTarget
|
|
163
|
+
if (!(0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_use_vanilla_components')) {
|
|
164
|
+
var _this$tooltipTarget, _this$tooltipTarget2;
|
|
165
|
+
(_this$tooltipTarget = this.tooltipTarget) === null || _this$tooltipTarget === void 0 || _this$tooltipTarget.removeAttribute('popovertarget');
|
|
166
|
+
(_this$tooltipTarget2 = this.tooltipTarget) === null || _this$tooltipTarget2 === void 0 || _this$tooltipTarget2.removeAttribute('aria-describedby');
|
|
167
|
+
}
|
|
162
168
|
this.destroyLazyTooltipListeners = undefined;
|
|
163
169
|
this.tooltipInstance = undefined;
|
|
164
170
|
this.tooltipTarget = undefined;
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.emojiNodeSpec = void 0;
|
|
8
8
|
exports.emojiToDom = emojiToDom;
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
-
var
|
|
10
|
+
var _emoji = require("@atlaskit/adf-schema/emoji");
|
|
11
11
|
var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
|
|
12
12
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
13
13
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
@@ -22,7 +22,7 @@ var isSSR = Boolean(process.env.REACT_SSR);
|
|
|
22
22
|
* @returns
|
|
23
23
|
*/
|
|
24
24
|
var emojiNodeSpec = exports.emojiNodeSpec = function emojiNodeSpec() {
|
|
25
|
-
var emojiNode = (0, _fg.fg)('platform_editor_adf_with_localid') ?
|
|
25
|
+
var emojiNode = (0, _fg.fg)('platform_editor_adf_with_localid') ? _emoji.emojiWithLocalId : _emoji.emoji;
|
|
26
26
|
if (isSSR) {
|
|
27
27
|
return emojiNode;
|
|
28
28
|
}
|
|
@@ -10,6 +10,7 @@ import { VanillaTooltip } from '@atlaskit/editor-common/vanilla-tooltip';
|
|
|
10
10
|
import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
|
|
11
11
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
12
12
|
import { emojiIdToEmoji } from '@atlaskit/emoji/emoji-id-to-emoji';
|
|
13
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
13
14
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
14
15
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
15
16
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
@@ -36,11 +37,16 @@ export function isSingleEmoji(fallbackText) {
|
|
|
36
37
|
const EMOJI_TOOLTIP_CLASS = 'emoji-tooltip-editor';
|
|
37
38
|
export class EmojiNodeView {
|
|
38
39
|
destroyTooltip() {
|
|
39
|
-
var _this$destroyLazyTool, _this$tooltipInstance
|
|
40
|
+
var _this$destroyLazyTool, _this$tooltipInstance;
|
|
40
41
|
(_this$destroyLazyTool = this.destroyLazyTooltipListeners) === null || _this$destroyLazyTool === void 0 ? void 0 : _this$destroyLazyTool.call(this);
|
|
41
42
|
(_this$tooltipInstance = this.tooltipInstance) === null || _this$tooltipInstance === void 0 ? void 0 : _this$tooltipInstance.destroy();
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
// with platform_editor_use_vanilla_components the tooltipInstance?.destroy()
|
|
44
|
+
// will remove the popovertarget and aria-describedby attributes from the tooltipTarget
|
|
45
|
+
if (!isExperimentEnabled('platform_editor_use_vanilla_components')) {
|
|
46
|
+
var _this$tooltipTarget, _this$tooltipTarget2;
|
|
47
|
+
(_this$tooltipTarget = this.tooltipTarget) === null || _this$tooltipTarget === void 0 ? void 0 : _this$tooltipTarget.removeAttribute('popovertarget');
|
|
48
|
+
(_this$tooltipTarget2 = this.tooltipTarget) === null || _this$tooltipTarget2 === void 0 ? void 0 : _this$tooltipTarget2.removeAttribute('aria-describedby');
|
|
49
|
+
}
|
|
44
50
|
this.destroyLazyTooltipListeners = undefined;
|
|
45
51
|
this.tooltipInstance = undefined;
|
|
46
52
|
this.tooltipTarget = undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { emoji, emojiWithLocalId } from '@atlaskit/adf-schema';
|
|
1
|
+
import { emoji, emojiWithLocalId } from '@atlaskit/adf-schema/emoji';
|
|
2
2
|
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
4
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -14,6 +14,7 @@ import { VanillaTooltip } from '@atlaskit/editor-common/vanilla-tooltip';
|
|
|
14
14
|
import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
|
|
15
15
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
16
16
|
import { emojiIdToEmoji } from '@atlaskit/emoji/emoji-id-to-emoji';
|
|
17
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
17
18
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
18
19
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
19
20
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
@@ -146,11 +147,16 @@ export var EmojiNodeView = /*#__PURE__*/function () {
|
|
|
146
147
|
return _createClass(EmojiNodeView, [{
|
|
147
148
|
key: "destroyTooltip",
|
|
148
149
|
value: function destroyTooltip() {
|
|
149
|
-
var _this$destroyLazyTool, _this$tooltipInstance
|
|
150
|
+
var _this$destroyLazyTool, _this$tooltipInstance;
|
|
150
151
|
(_this$destroyLazyTool = this.destroyLazyTooltipListeners) === null || _this$destroyLazyTool === void 0 || _this$destroyLazyTool.call(this);
|
|
151
152
|
(_this$tooltipInstance = this.tooltipInstance) === null || _this$tooltipInstance === void 0 || _this$tooltipInstance.destroy();
|
|
152
|
-
|
|
153
|
-
|
|
153
|
+
// with platform_editor_use_vanilla_components the tooltipInstance?.destroy()
|
|
154
|
+
// will remove the popovertarget and aria-describedby attributes from the tooltipTarget
|
|
155
|
+
if (!isExperimentEnabled('platform_editor_use_vanilla_components')) {
|
|
156
|
+
var _this$tooltipTarget, _this$tooltipTarget2;
|
|
157
|
+
(_this$tooltipTarget = this.tooltipTarget) === null || _this$tooltipTarget === void 0 || _this$tooltipTarget.removeAttribute('popovertarget');
|
|
158
|
+
(_this$tooltipTarget2 = this.tooltipTarget) === null || _this$tooltipTarget2 === void 0 || _this$tooltipTarget2.removeAttribute('aria-describedby');
|
|
159
|
+
}
|
|
154
160
|
this.destroyLazyTooltipListeners = undefined;
|
|
155
161
|
this.tooltipInstance = undefined;
|
|
156
162
|
this.tooltipTarget = undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
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; }
|
|
4
|
-
import { emoji, emojiWithLocalId } from '@atlaskit/adf-schema';
|
|
4
|
+
import { emoji, emojiWithLocalId } from '@atlaskit/adf-schema/emoji';
|
|
5
5
|
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
7
7
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EmojiDefinition } from '@atlaskit/adf-schema';
|
|
1
|
+
import type { EmojiDefinition } from '@atlaskit/adf-schema/emoji';
|
|
2
2
|
import type { JSONNode } from '@atlaskit/editor-json-transformer/types';
|
|
3
3
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import type { EmojiResource, OptionalEmojiDescriptionWithVariations } from '@atlaskit/emoji';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-emoji",
|
|
3
|
-
"version": "17.2.
|
|
3
|
+
"version": "17.2.4",
|
|
4
4
|
"description": "Emoji plugin for @atlaskit/editor-core",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
42
42
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
43
43
|
"@atlaskit/prosemirror-input-rules": "^4.1.0",
|
|
44
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
44
|
+
"@atlaskit/tmp-editor-statsig": "^173.0.0",
|
|
45
45
|
"@atlaskit/tokens": "^16.11.0",
|
|
46
46
|
"@babel/runtime": "^7.0.0",
|
|
47
47
|
"@emotion/react": "^11.7.1",
|