@atlaskit/editor-plugin-emoji 9.0.27 → 9.0.29

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,22 @@
1
1
  # @atlaskit/editor-plugin-emoji
2
2
 
3
+ ## 9.0.29
4
+
5
+ ### Patch Changes
6
+
7
+ - [`f4951e15e9432`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f4951e15e9432) -
8
+ Removed `platform_editor_emoji_tooltips_on_hover` experiment. Emoji tooltips (title attribute) are
9
+ now always enabled permanently.
10
+ - Updated dependencies
11
+
12
+ ## 9.0.28
13
+
14
+ ### Patch Changes
15
+
16
+ - [`48a64b7bbac82`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/48a64b7bbac82) -
17
+ Clean up stale experiment platform_editor_plain_text_support (always-enabled path)
18
+ - Updated dependencies
19
+
3
20
  ## 9.0.27
4
21
 
5
22
  ### Patch Changes
@@ -22,7 +22,6 @@ var _utils = require("@atlaskit/editor-common/utils");
22
22
  var _state = require("@atlaskit/editor-prosemirror/state");
23
23
  var _emoji2 = require("@atlaskit/emoji");
24
24
  var _comment = _interopRequireDefault(require("@atlaskit/icon/core/comment"));
25
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
26
25
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
27
26
  var _insertEmoji = require("./editor-commands/insert-emoji");
28
27
  var _emojiNodeSpec = require("./nodeviews/emojiNodeSpec");
@@ -151,7 +150,7 @@ var emojiPlugin = exports.emojiPlugin = function emojiPlugin(_ref2) {
151
150
  var normalizedQuery = TRIGGER.concat(query);
152
151
  // if the query has space at the end
153
152
  // check the ascii map for emojis
154
- if (!(options !== null && options !== void 0 && options.disableAutoformat && (0, _expValEquals.expValEquals)('platform_editor_plain_text_support', 'isEnabled', true)) && asciiMap && normalizedQuery.length >= 3 && normalizedQuery.endsWith(' ') && asciiMap.has(normalizedQuery.trim())) {
153
+ if (!(options !== null && options !== void 0 && options.disableAutoformat) && asciiMap && normalizedQuery.length >= 3 && normalizedQuery.endsWith(' ') && asciiMap.has(normalizedQuery.trim())) {
155
154
  var _emoji = asciiMap.get(normalizedQuery.trim());
156
155
  return {
157
156
  title: (_emoji === null || _emoji === void 0 ? void 0 : _emoji.name) || '',
@@ -228,7 +227,7 @@ var emojiPlugin = exports.emojiPlugin = function emojiPlugin(_ref2) {
228
227
  plugin: function plugin(_ref8) {
229
228
  var _api$analytics4;
230
229
  var schema = _ref8.schema;
231
- return (0, _asciiInputRules.inputRulePlugin)(schema, api === null || api === void 0 || (_api$analytics4 = api.analytics) === null || _api$analytics4 === void 0 ? void 0 : _api$analytics4.actions, api, (0, _expValEquals.expValEquals)('platform_editor_plain_text_support', 'isEnabled', true) ? options === null || options === void 0 ? void 0 : options.disableAutoformat : undefined);
230
+ return (0, _asciiInputRules.inputRulePlugin)(schema, api === null || api === void 0 || (_api$analytics4 = api.analytics) === null || _api$analytics4 === void 0 ? void 0 : _api$analytics4.actions, api, options === null || options === void 0 ? void 0 : options.disableAutoformat);
232
231
  }
233
232
  }];
234
233
  },
@@ -239,9 +239,7 @@ var EmojiNodeView = exports.EmojiNodeView = /*#__PURE__*/function () {
239
239
  // Add wrapper for the emoji
240
240
  var containerElement = document.createElement('span');
241
241
  containerElement.setAttribute('role', 'img');
242
- if ((0, _expValEquals.expValEquals)('platform_editor_emoji_tooltips_on_hover', 'isEnabled', true)) {
243
- containerElement.setAttribute('title', description.shortName);
244
- }
242
+ containerElement.setAttribute('title', description.shortName);
245
243
  containerElement.classList.add(_emoji.EmojiSharedCssClassName.EMOJI_CONTAINER);
246
244
  containerElement.setAttribute('data-testid', "".concat(emojiType, "-emoji-").concat(description.shortName));
247
245
  containerElement.setAttribute('data-emoji-type', emojiType);
@@ -18,13 +18,12 @@ var _analytics = require("@atlaskit/editor-common/analytics");
18
18
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
19
19
  var _utils = require("@atlaskit/editor-common/utils");
20
20
  var _prosemirrorInputRules = require("@atlaskit/prosemirror-input-rules");
21
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
22
21
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
23
22
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
24
23
  function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
25
24
  var matcher;
26
25
  function inputRulePlugin(schema, editorAnalyticsAPI, pluginInjectionApi, disableAutoformat) {
27
- if (disableAutoformat && (0, _expValEquals.expValEquals)('platform_editor_plain_text_support', 'isEnabled', true)) {
26
+ if (disableAutoformat) {
28
27
  return;
29
28
  }
30
29
  if (schema.nodes.emoji) {
@@ -9,7 +9,6 @@ import { calculateToolbarPositionAboveSelection } from '@atlaskit/editor-common/
9
9
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
10
10
  import { EmojiTypeAheadItem, preloadEmojiPicker, recordSelectionFailedSli, recordSelectionSucceededSli, SearchSort } from '@atlaskit/emoji';
11
11
  import CommentIcon from '@atlaskit/icon/core/comment';
12
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
13
12
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
14
13
  import { createEmojiFragment, insertEmoji } from './editor-commands/insert-emoji';
15
14
  import { emojiNodeSpec } from './nodeviews/emojiNodeSpec';
@@ -130,7 +129,7 @@ export const emojiPlugin = ({
130
129
  const normalizedQuery = TRIGGER.concat(query);
131
130
  // if the query has space at the end
132
131
  // check the ascii map for emojis
133
- if (!(options !== null && options !== void 0 && options.disableAutoformat && expValEquals('platform_editor_plain_text_support', 'isEnabled', true)) && asciiMap && normalizedQuery.length >= 3 && normalizedQuery.endsWith(' ') && asciiMap.has(normalizedQuery.trim())) {
132
+ if (!(options !== null && options !== void 0 && options.disableAutoformat) && asciiMap && normalizedQuery.length >= 3 && normalizedQuery.endsWith(' ') && asciiMap.has(normalizedQuery.trim())) {
134
133
  const emoji = asciiMap.get(normalizedQuery.trim());
135
134
  return {
136
135
  title: (emoji === null || emoji === void 0 ? void 0 : emoji.name) || '',
@@ -214,7 +213,7 @@ export const emojiPlugin = ({
214
213
  schema
215
214
  }) => {
216
215
  var _api$analytics4;
217
- return asciiInputRulePlugin(schema, api === null || api === void 0 ? void 0 : (_api$analytics4 = api.analytics) === null || _api$analytics4 === void 0 ? void 0 : _api$analytics4.actions, api, expValEquals('platform_editor_plain_text_support', 'isEnabled', true) ? options === null || options === void 0 ? void 0 : options.disableAutoformat : undefined);
216
+ return asciiInputRulePlugin(schema, api === null || api === void 0 ? void 0 : (_api$analytics4 = api.analytics) === null || _api$analytics4 === void 0 ? void 0 : _api$analytics4.actions, api, options === null || options === void 0 ? void 0 : options.disableAutoformat);
218
217
  }
219
218
  }];
220
219
  },
@@ -205,9 +205,7 @@ export class EmojiNodeView {
205
205
  // Add wrapper for the emoji
206
206
  const containerElement = document.createElement('span');
207
207
  containerElement.setAttribute('role', 'img');
208
- if (expValEquals('platform_editor_emoji_tooltips_on_hover', 'isEnabled', true)) {
209
- containerElement.setAttribute('title', description.shortName);
210
- }
208
+ containerElement.setAttribute('title', description.shortName);
211
209
  containerElement.classList.add(EmojiSharedCssClassName.EMOJI_CONTAINER);
212
210
  containerElement.setAttribute('data-testid', `${emojiType}-emoji-${description.shortName}`);
213
211
  containerElement.setAttribute('data-emoji-type', emojiType);
@@ -3,10 +3,9 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } f
3
3
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
4
  import { createRule } from '@atlaskit/editor-common/utils';
5
5
  import { createPlugin, leafNodeReplacementCharacter } from '@atlaskit/prosemirror-input-rules';
6
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
7
6
  let matcher;
8
7
  export function inputRulePlugin(schema, editorAnalyticsAPI, pluginInjectionApi, disableAutoformat) {
9
- if (disableAutoformat && expValEquals('platform_editor_plain_text_support', 'isEnabled', true)) {
8
+ if (disableAutoformat) {
10
9
  return;
11
10
  }
12
11
  if (schema.nodes.emoji) {
@@ -14,7 +14,6 @@ import { calculateToolbarPositionAboveSelection } from '@atlaskit/editor-common/
14
14
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
15
15
  import { EmojiTypeAheadItem, preloadEmojiPicker, recordSelectionFailedSli, recordSelectionSucceededSli, SearchSort } from '@atlaskit/emoji';
16
16
  import CommentIcon from '@atlaskit/icon/core/comment';
17
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
18
17
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
19
18
  import { createEmojiFragment, insertEmoji } from './editor-commands/insert-emoji';
20
19
  import { emojiNodeSpec } from './nodeviews/emojiNodeSpec';
@@ -140,7 +139,7 @@ export var emojiPlugin = function emojiPlugin(_ref2) {
140
139
  var normalizedQuery = TRIGGER.concat(query);
141
140
  // if the query has space at the end
142
141
  // check the ascii map for emojis
143
- if (!(options !== null && options !== void 0 && options.disableAutoformat && expValEquals('platform_editor_plain_text_support', 'isEnabled', true)) && asciiMap && normalizedQuery.length >= 3 && normalizedQuery.endsWith(' ') && asciiMap.has(normalizedQuery.trim())) {
142
+ if (!(options !== null && options !== void 0 && options.disableAutoformat) && asciiMap && normalizedQuery.length >= 3 && normalizedQuery.endsWith(' ') && asciiMap.has(normalizedQuery.trim())) {
144
143
  var _emoji = asciiMap.get(normalizedQuery.trim());
145
144
  return {
146
145
  title: (_emoji === null || _emoji === void 0 ? void 0 : _emoji.name) || '',
@@ -217,7 +216,7 @@ export var emojiPlugin = function emojiPlugin(_ref2) {
217
216
  plugin: function plugin(_ref8) {
218
217
  var _api$analytics4;
219
218
  var schema = _ref8.schema;
220
- return asciiInputRulePlugin(schema, api === null || api === void 0 || (_api$analytics4 = api.analytics) === null || _api$analytics4 === void 0 ? void 0 : _api$analytics4.actions, api, expValEquals('platform_editor_plain_text_support', 'isEnabled', true) ? options === null || options === void 0 ? void 0 : options.disableAutoformat : undefined);
219
+ return asciiInputRulePlugin(schema, api === null || api === void 0 || (_api$analytics4 = api.analytics) === null || _api$analytics4 === void 0 ? void 0 : _api$analytics4.actions, api, options === null || options === void 0 ? void 0 : options.disableAutoformat);
221
220
  }
222
221
  }];
223
222
  },
@@ -231,9 +231,7 @@ export var EmojiNodeView = /*#__PURE__*/function () {
231
231
  // Add wrapper for the emoji
232
232
  var containerElement = document.createElement('span');
233
233
  containerElement.setAttribute('role', 'img');
234
- if (expValEquals('platform_editor_emoji_tooltips_on_hover', 'isEnabled', true)) {
235
- containerElement.setAttribute('title', description.shortName);
236
- }
234
+ containerElement.setAttribute('title', description.shortName);
237
235
  containerElement.classList.add(EmojiSharedCssClassName.EMOJI_CONTAINER);
238
236
  containerElement.setAttribute('data-testid', "".concat(emojiType, "-emoji-").concat(description.shortName));
239
237
  containerElement.setAttribute('data-emoji-type', emojiType);
@@ -13,10 +13,9 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } f
13
13
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
14
14
  import { createRule } from '@atlaskit/editor-common/utils';
15
15
  import { createPlugin, leafNodeReplacementCharacter } from '@atlaskit/prosemirror-input-rules';
16
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
17
16
  var matcher;
18
17
  export function inputRulePlugin(schema, editorAnalyticsAPI, pluginInjectionApi, disableAutoformat) {
19
- if (disableAutoformat && expValEquals('platform_editor_plain_text_support', 'isEnabled', true)) {
18
+ if (disableAutoformat) {
20
19
  return;
21
20
  }
22
21
  if (schema.nodes.emoji) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-emoji",
3
- "version": "9.0.27",
3
+ "version": "9.0.29",
4
4
  "description": "Emoji plugin for @atlaskit/editor-core",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -36,8 +36,8 @@
36
36
  "@atlaskit/node-data-provider": "^9.0.0",
37
37
  "@atlaskit/platform-feature-flags": "^1.1.0",
38
38
  "@atlaskit/prosemirror-input-rules": "^3.6.0",
39
- "@atlaskit/tmp-editor-statsig": "^57.0.0",
40
- "@atlaskit/tokens": "^12.0.0",
39
+ "@atlaskit/tmp-editor-statsig": "^59.1.0",
40
+ "@atlaskit/tokens": "^13.0.0",
41
41
  "@babel/runtime": "^7.0.0",
42
42
  "@emotion/react": "^11.7.1",
43
43
  "lodash": "^4.17.21",
@@ -45,7 +45,7 @@
45
45
  "react-loadable": "^5.1.0"
46
46
  },
47
47
  "peerDependencies": {
48
- "@atlaskit/editor-common": "^112.19.0",
48
+ "@atlaskit/editor-common": "^112.20.0",
49
49
  "react": "^18.2.0",
50
50
  "react-dom": "^18.2.0"
51
51
  },