@atlaskit/editor-plugin-emoji 3.7.2 → 3.7.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,20 @@
1
1
  # @atlaskit/editor-plugin-emoji
2
2
 
3
+ ## 3.7.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 3.7.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [#162451](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/162451)
14
+ [`ef8e2f1c70087`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ef8e2f1c70087) -
15
+ Switching tbt performance fixes in inlineEmojiPopup and BlockMenu to experiment flag
16
+ - Updated dependencies
17
+
3
18
  ## 3.7.2
4
19
 
5
20
  ### Patch Changes
@@ -36,8 +36,7 @@ var _EmojiNodeView = require("./nodeviews/EmojiNodeView");
36
36
  var _actions = require("./pm-plugins/actions");
37
37
  var _asciiInputRules = require("./pm-plugins/ascii-input-rules");
38
38
  var _InlineEmojiPopup = require("./ui/InlineEmojiPopup");
39
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
40
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
39
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
41
40
  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; }
42
41
  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) { (0, _defineProperty2.default)(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; }
43
42
  var emojiToTypeaheadItem = exports.emojiToTypeaheadItem = function emojiToTypeaheadItem(emoji, emojiProvider) {
@@ -297,8 +296,8 @@ var emojiPlugin = exports.emojiPlugin = function emojiPlugin(_ref2) {
297
296
  return _context.abrupt("return", false);
298
297
  case 5:
299
298
  previousEmojiProvider = provider;
300
- return _context.abrupt("return", (_api$core$actions$exe = api === null || api === void 0 ? void 0 : api.core.actions.execute(function (_ref10) {
301
- var tr = _ref10.tr;
299
+ return _context.abrupt("return", (_api$core$actions$exe = api === null || api === void 0 ? void 0 : api.core.actions.execute(function (_ref0) {
300
+ var tr = _ref0.tr;
302
301
  return setProviderTr(provider)(tr);
303
302
  })) !== null && _api$core$actions$exe !== void 0 ? _api$core$actions$exe : false);
304
303
  case 7:
@@ -316,15 +315,15 @@ var emojiPlugin = exports.emojiPlugin = function emojiPlugin(_ref2) {
316
315
  commands: {
317
316
  insertEmoji: (0, _insertEmoji.insertEmoji)(api === null || api === void 0 || (_api$analytics5 = api.analytics) === null || _api$analytics5 === void 0 ? void 0 : _api$analytics5.actions)
318
317
  },
319
- contentComponent: function contentComponent(_ref11) {
320
- var editorView = _ref11.editorView,
321
- popupsBoundariesElement = _ref11.popupsBoundariesElement,
322
- popupsMountPoint = _ref11.popupsMountPoint,
323
- popupsScrollableElement = _ref11.popupsScrollableElement;
318
+ contentComponent: function contentComponent(_ref1) {
319
+ var editorView = _ref1.editorView,
320
+ popupsBoundariesElement = _ref1.popupsBoundariesElement,
321
+ popupsMountPoint = _ref1.popupsMountPoint,
322
+ popupsScrollableElement = _ref1.popupsScrollableElement;
324
323
  if (!api || (0, _experiments.editorExperiment)('platform_editor_controls', 'control')) {
325
324
  return null;
326
325
  }
327
- if (!(0, _platformFeatureFlags.fg)('platform_editor_controls_perf_tbt_fix')) {
326
+ if (!(0, _experiments.editorExperiment)('platform_editor_controls_performance_fixes', true)) {
328
327
  return /*#__PURE__*/_react.default.createElement(_InlineEmojiPopup.InlineEmojiPopupOld, {
329
328
  api: api,
330
329
  editorView: editorView,
@@ -345,8 +344,8 @@ var emojiPlugin = exports.emojiPlugin = function emojiPlugin(_ref2) {
345
344
  });
346
345
  },
347
346
  pluginsOptions: {
348
- quickInsert: function quickInsert(_ref12) {
349
- var formatMessage = _ref12.formatMessage;
347
+ quickInsert: function quickInsert(_ref10) {
348
+ var formatMessage = _ref10.formatMessage;
350
349
  return [{
351
350
  id: 'emoji',
352
351
  title: formatMessage(_messages.toolbarInsertBlockMessages.emoji),
@@ -525,12 +524,12 @@ function createEmojiPlugin(pmPluginFactoryParams, options, api) {
525
524
  return {};
526
525
  },
527
526
  apply: function apply(tr, pluginState) {
528
- var _ref13 = tr.getMeta(emojiPluginKey) || {
527
+ var _ref11 = tr.getMeta(emojiPluginKey) || {
529
528
  action: null,
530
529
  params: null
531
530
  },
532
- action = _ref13.action,
533
- params = _ref13.params;
531
+ action = _ref11.action,
532
+ params = _ref11.params;
534
533
  var newPluginState = pluginState;
535
534
  switch (action) {
536
535
  case _actions.ACTIONS.SET_PROVIDER:
@@ -17,8 +17,7 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
17
17
  var _emoji = require("@atlaskit/emoji");
18
18
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
19
19
  var _actions = require("../pm-plugins/actions");
20
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
21
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
20
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
22
21
  var PopupWithListeners = (0, _uiReact.withReactEditorViewOuterListeners)(_ui.Popup);
23
22
  var emojiPopupMessages = {
24
23
  emojiPickerAriaLabel: {
@@ -7,8 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.LoadableSimpleEmojiPlaceholder = exports.LoadableSimpleEmoji = void 0;
8
8
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
9
9
  var _reactLoadable = _interopRequireDefault(require("react-loadable"));
10
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
11
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
10
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
12
11
  var LoadableSimpleEmoji = exports.LoadableSimpleEmoji = (0, _reactLoadable.default)({
13
12
  loader: function loader() {
14
13
  return Promise.resolve().then(function () {
@@ -11,8 +11,7 @@ var _reactIntlNext = require("react-intl-next");
11
11
  var _emoji = require("@atlaskit/editor-common/emoji");
12
12
  var _pluginHooks = require("@atlaskit/node-data-provider/plugin-hooks");
13
13
  var _LoadableSimpleEmoji = require("./LoadableSimpleEmoji");
14
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
15
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
14
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
16
15
  /**
17
16
  * @jsxRuntime classic
18
17
  * @jsx jsx
@@ -287,7 +287,7 @@ export const emojiPlugin = ({
287
287
  if (!api || editorExperiment('platform_editor_controls', 'control')) {
288
288
  return null;
289
289
  }
290
- if (!fg('platform_editor_controls_perf_tbt_fix')) {
290
+ if (!editorExperiment('platform_editor_controls_performance_fixes', true)) {
291
291
  return /*#__PURE__*/React.createElement(InlineEmojiPopupOld, {
292
292
  api: api,
293
293
  editorView: editorView,
@@ -282,8 +282,8 @@ export var emojiPlugin = function emojiPlugin(_ref2) {
282
282
  return _context.abrupt("return", false);
283
283
  case 5:
284
284
  previousEmojiProvider = provider;
285
- return _context.abrupt("return", (_api$core$actions$exe = api === null || api === void 0 ? void 0 : api.core.actions.execute(function (_ref10) {
286
- var tr = _ref10.tr;
285
+ return _context.abrupt("return", (_api$core$actions$exe = api === null || api === void 0 ? void 0 : api.core.actions.execute(function (_ref0) {
286
+ var tr = _ref0.tr;
287
287
  return setProviderTr(provider)(tr);
288
288
  })) !== null && _api$core$actions$exe !== void 0 ? _api$core$actions$exe : false);
289
289
  case 7:
@@ -301,15 +301,15 @@ export var emojiPlugin = function emojiPlugin(_ref2) {
301
301
  commands: {
302
302
  insertEmoji: insertEmoji(api === null || api === void 0 || (_api$analytics5 = api.analytics) === null || _api$analytics5 === void 0 ? void 0 : _api$analytics5.actions)
303
303
  },
304
- contentComponent: function contentComponent(_ref11) {
305
- var editorView = _ref11.editorView,
306
- popupsBoundariesElement = _ref11.popupsBoundariesElement,
307
- popupsMountPoint = _ref11.popupsMountPoint,
308
- popupsScrollableElement = _ref11.popupsScrollableElement;
304
+ contentComponent: function contentComponent(_ref1) {
305
+ var editorView = _ref1.editorView,
306
+ popupsBoundariesElement = _ref1.popupsBoundariesElement,
307
+ popupsMountPoint = _ref1.popupsMountPoint,
308
+ popupsScrollableElement = _ref1.popupsScrollableElement;
309
309
  if (!api || editorExperiment('platform_editor_controls', 'control')) {
310
310
  return null;
311
311
  }
312
- if (!fg('platform_editor_controls_perf_tbt_fix')) {
312
+ if (!editorExperiment('platform_editor_controls_performance_fixes', true)) {
313
313
  return /*#__PURE__*/React.createElement(InlineEmojiPopupOld, {
314
314
  api: api,
315
315
  editorView: editorView,
@@ -330,8 +330,8 @@ export var emojiPlugin = function emojiPlugin(_ref2) {
330
330
  });
331
331
  },
332
332
  pluginsOptions: {
333
- quickInsert: function quickInsert(_ref12) {
334
- var formatMessage = _ref12.formatMessage;
333
+ quickInsert: function quickInsert(_ref10) {
334
+ var formatMessage = _ref10.formatMessage;
335
335
  return [{
336
336
  id: 'emoji',
337
337
  title: formatMessage(messages.emoji),
@@ -510,12 +510,12 @@ export function createEmojiPlugin(pmPluginFactoryParams, options, api) {
510
510
  return {};
511
511
  },
512
512
  apply: function apply(tr, pluginState) {
513
- var _ref13 = tr.getMeta(emojiPluginKey) || {
513
+ var _ref11 = tr.getMeta(emojiPluginKey) || {
514
514
  action: null,
515
515
  params: null
516
516
  },
517
- action = _ref13.action,
518
- params = _ref13.params;
517
+ action = _ref11.action,
518
+ params = _ref11.params;
519
519
  var newPluginState = pluginState;
520
520
  switch (action) {
521
521
  case ACTIONS.SET_PROVIDER:
@@ -5,8 +5,12 @@ import { type EmojiPlugin } from '../emojiPluginType';
5
5
  type InlineEmojiPopupProps = Pick<UiComponentFactoryParams, 'popupsBoundariesElement' | 'popupsMountPoint' | 'popupsScrollableElement'> & {
6
6
  api: ExtractInjectionAPI<EmojiPlugin>;
7
7
  editorView: EditorView;
8
- onClose?: () => void;
9
8
  };
10
- export declare const InlineEmojiPopupOld: ({ api, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, editorView, onClose, }: InlineEmojiPopupProps) => React.JSX.Element | null;
9
+ export declare const InlineEmojiPopupOld: ({ api, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, editorView, onClose, }: Pick<UiComponentFactoryParams, "popupsBoundariesElement" | "popupsMountPoint" | "popupsScrollableElement"> & {
10
+ api: ExtractInjectionAPI<EmojiPlugin>;
11
+ editorView: EditorView;
12
+ } & {
13
+ onClose: () => void;
14
+ }) => React.JSX.Element | null;
11
15
  export declare const InlineEmojiPopup: React.MemoExoticComponent<({ api, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, editorView, }: InlineEmojiPopupProps) => React.JSX.Element | null>;
12
16
  export {};
@@ -5,8 +5,12 @@ import { type EmojiPlugin } from '../emojiPluginType';
5
5
  type InlineEmojiPopupProps = Pick<UiComponentFactoryParams, 'popupsBoundariesElement' | 'popupsMountPoint' | 'popupsScrollableElement'> & {
6
6
  api: ExtractInjectionAPI<EmojiPlugin>;
7
7
  editorView: EditorView;
8
- onClose?: () => void;
9
8
  };
10
- export declare const InlineEmojiPopupOld: ({ api, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, editorView, onClose, }: InlineEmojiPopupProps) => React.JSX.Element | null;
9
+ export declare const InlineEmojiPopupOld: ({ api, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, editorView, onClose, }: Pick<UiComponentFactoryParams, "popupsBoundariesElement" | "popupsMountPoint" | "popupsScrollableElement"> & {
10
+ api: ExtractInjectionAPI<EmojiPlugin>;
11
+ editorView: EditorView;
12
+ } & {
13
+ onClose: () => void;
14
+ }) => React.JSX.Element | null;
11
15
  export declare const InlineEmojiPopup: React.MemoExoticComponent<({ api, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, editorView, }: InlineEmojiPopupProps) => React.JSX.Element | null>;
12
16
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-emoji",
3
- "version": "3.7.2",
3
+ "version": "3.7.4",
4
4
  "description": "Emoji plugin for @atlaskit/editor-core",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@atlaskit/adf-schema": "^47.6.0",
26
- "@atlaskit/editor-common": "^106.0.0",
26
+ "@atlaskit/editor-common": "^106.1.0",
27
27
  "@atlaskit/editor-plugin-analytics": "^2.3.0",
28
28
  "@atlaskit/editor-plugin-annotation": "^2.9.0",
29
29
  "@atlaskit/editor-plugin-base": "^3.0.0",
@@ -38,8 +38,8 @@
38
38
  "@atlaskit/platform-feature-flags": "^1.1.0",
39
39
  "@atlaskit/prosemirror-input-rules": "^3.3.0",
40
40
  "@atlaskit/theme": "^18.0.0",
41
- "@atlaskit/tmp-editor-statsig": "^5.4.0",
42
- "@atlaskit/tokens": "^4.9.0",
41
+ "@atlaskit/tmp-editor-statsig": "^5.7.0",
42
+ "@atlaskit/tokens": "^5.0.0",
43
43
  "@babel/runtime": "^7.0.0",
44
44
  "@emotion/react": "^11.7.1",
45
45
  "react-intl-next": "npm:react-intl@^5.18.1",
@@ -113,9 +113,6 @@
113
113
  },
114
114
  "platform_editor_ease_of_use_metrics": {
115
115
  "type": "boolean"
116
- },
117
- "platform_editor_controls_perf_tbt_fix": {
118
- "type": "boolean"
119
116
  }
120
117
  }
121
118
  }