@atlaskit/editor-plugin-emoji 29.0.2 → 30.0.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,19 @@
1
1
  # @atlaskit/editor-plugin-emoji
2
2
 
3
+ ## 30.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 30.0.0
10
+
11
+ ### Patch Changes
12
+
13
+ - [`49d75093d8f1c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/49d75093d8f1c) -
14
+ Clean up feature gate `platform_editor_custom_emoji_unicode_fallback`
15
+ - Updated dependencies
16
+
3
17
  ## 29.0.2
4
18
 
5
19
  ### Patch Changes
@@ -24,7 +24,6 @@ var _vanillaTooltip = require("@atlaskit/editor-common/vanilla-tooltip");
24
24
  var _model = require("@atlaskit/editor-prosemirror/model");
25
25
  var _constants = require("@atlaskit/emoji/constants");
26
26
  var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
27
- var _fg = require("@atlaskit/platform-feature-flags/fg");
28
27
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
29
28
  var _emojiNodeSpec = require("./emojiNodeSpec");
30
29
  /**
@@ -342,13 +341,11 @@ var EmojiNodeView = exports.EmojiNodeView = /*#__PURE__*/function () {
342
341
  text = _this$node$attrs2.text,
343
342
  shortName = _this$node$attrs2.shortName;
344
343
 
345
- // When the gate is enabled and the emoji is "custom" (i.e. its fallback
346
- // text is not a single standard Unicode emoji), render the Unicode
347
- // Replacement Character (U+FFFD) instead of the shortName text. Standard
348
- // emojis continue to fall back to their Unicode text representation.
344
+ // Custom emojis (fallback text is not a single standard Unicode emoji)
345
+ // render the Unicode Replacement Character (U+FFFD) instead of the
346
+ // shortName text. Standard emojis fall back to their Unicode text.
349
347
  var fallbackText = text || shortName;
350
- var useReplacementChar = (0, _fg.fg)('platform_editor_custom_emoji_unicode_fallback') && !(0, _isSingleEmoji.isSingleEmoji)(fallbackText);
351
- var renderedFallbackText = useReplacementChar ? "\uFFFD" : fallbackText;
348
+ var renderedFallbackText = (0, _isSingleEmoji.isSingleEmoji)(fallbackText) ? fallbackText : "\uFFFD";
352
349
  fallbackElement.innerText = renderedFallbackText;
353
350
  fallbackElement.setAttribute('role', 'img');
354
351
  fallbackElement.setAttribute('title', shortName);
@@ -14,7 +14,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
14
14
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
15
15
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
16
  var _isSsr = require("@atlaskit/editor-common/is-ssr");
17
- var _emoji = require("@atlaskit/emoji");
17
+ var _constants = require("@atlaskit/emoji/constants");
18
18
  var _nodeDataProvider = require("@atlaskit/node-data-provider/node-data-provider");
19
19
  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; }
20
20
  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; }
@@ -107,8 +107,8 @@ var EmojiNodeDataProvider = exports.EmojiNodeDataProvider = /*#__PURE__*/functio
107
107
  shortName: node.attrs.shortName,
108
108
  fallback: node.attrs.text,
109
109
  representation: {
110
- height: _emoji.defaultEmojiHeight,
111
- width: _emoji.defaultEmojiHeight,
110
+ height: _constants.defaultEmojiHeight,
111
+ width: _constants.defaultEmojiHeight,
112
112
  imagePath: optimisticImageURL
113
113
  },
114
114
  searchable: true,
@@ -13,7 +13,6 @@ import { VANILLA_TOOLTIP_DEFAULT_CLASS, VanillaTooltip } from '@atlaskit/editor-
13
13
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
14
14
  import { defaultEmojiHeight } from '@atlaskit/emoji/constants';
15
15
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
16
- import { fg } from '@atlaskit/platform-feature-flags/fg';
17
16
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
18
17
  import { emojiToDom } from './emojiNodeSpec';
19
18
  /**
@@ -305,13 +304,11 @@ export class EmojiNodeView {
305
304
  shortName
306
305
  } = this.node.attrs;
307
306
 
308
- // When the gate is enabled and the emoji is "custom" (i.e. its fallback
309
- // text is not a single standard Unicode emoji), render the Unicode
310
- // Replacement Character (U+FFFD) instead of the shortName text. Standard
311
- // emojis continue to fall back to their Unicode text representation.
307
+ // Custom emojis (fallback text is not a single standard Unicode emoji)
308
+ // render the Unicode Replacement Character (U+FFFD) instead of the
309
+ // shortName text. Standard emojis fall back to their Unicode text.
312
310
  const fallbackText = text || shortName;
313
- const useReplacementChar = fg('platform_editor_custom_emoji_unicode_fallback') && !isSingleEmoji(fallbackText);
314
- const renderedFallbackText = useReplacementChar ? '\uFFFD' : fallbackText;
311
+ const renderedFallbackText = isSingleEmoji(fallbackText) ? fallbackText : '\uFFFD';
315
312
  fallbackElement.innerText = renderedFallbackText;
316
313
  fallbackElement.setAttribute('role', 'img');
317
314
  fallbackElement.setAttribute('title', shortName);
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import { isSSR } from '@atlaskit/editor-common/is-ssr';
3
- import { defaultEmojiHeight } from '@atlaskit/emoji';
3
+ import { defaultEmojiHeight } from '@atlaskit/emoji/constants';
4
4
  import { NodeDataProvider } from '@atlaskit/node-data-provider/node-data-provider';
5
5
  export class EmojiNodeDataProvider extends NodeDataProvider {
6
6
  constructor(resource) {
@@ -17,7 +17,6 @@ import { VANILLA_TOOLTIP_DEFAULT_CLASS, VanillaTooltip } from '@atlaskit/editor-
17
17
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
18
18
  import { defaultEmojiHeight } from '@atlaskit/emoji/constants';
19
19
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
20
- import { fg } from '@atlaskit/platform-feature-flags/fg';
21
20
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
22
21
  import { emojiToDom } from './emojiNodeSpec';
23
22
  /**
@@ -335,13 +334,11 @@ export var EmojiNodeView = /*#__PURE__*/function () {
335
334
  text = _this$node$attrs2.text,
336
335
  shortName = _this$node$attrs2.shortName;
337
336
 
338
- // When the gate is enabled and the emoji is "custom" (i.e. its fallback
339
- // text is not a single standard Unicode emoji), render the Unicode
340
- // Replacement Character (U+FFFD) instead of the shortName text. Standard
341
- // emojis continue to fall back to their Unicode text representation.
337
+ // Custom emojis (fallback text is not a single standard Unicode emoji)
338
+ // render the Unicode Replacement Character (U+FFFD) instead of the
339
+ // shortName text. Standard emojis fall back to their Unicode text.
342
340
  var fallbackText = text || shortName;
343
- var useReplacementChar = fg('platform_editor_custom_emoji_unicode_fallback') && !isSingleEmoji(fallbackText);
344
- var renderedFallbackText = useReplacementChar ? "\uFFFD" : fallbackText;
341
+ var renderedFallbackText = isSingleEmoji(fallbackText) ? fallbackText : "\uFFFD";
345
342
  fallbackElement.innerText = renderedFallbackText;
346
343
  fallbackElement.setAttribute('role', 'img');
347
344
  fallbackElement.setAttribute('title', shortName);
@@ -11,7 +11,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
11
11
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
12
12
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
13
13
  import { isSSR } from '@atlaskit/editor-common/is-ssr';
14
- import { defaultEmojiHeight } from '@atlaskit/emoji';
14
+ import { defaultEmojiHeight } from '@atlaskit/emoji/constants';
15
15
  import { NodeDataProvider } from '@atlaskit/node-data-provider/node-data-provider';
16
16
  export var EmojiNodeDataProvider = /*#__PURE__*/function (_NodeDataProvider) {
17
17
  function EmojiNodeDataProvider(resource) {
@@ -1,7 +1,8 @@
1
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
- import type { EmojiResource, OptionalEmojiDescriptionWithVariations } from '@atlaskit/emoji';
4
+ import type EmojiResource from '@atlaskit/emoji/emoji-resource';
5
+ import type { OptionalEmojiDescriptionWithVariations } from '@atlaskit/emoji/types';
5
6
  import { NodeDataProvider } from '@atlaskit/node-data-provider/node-data-provider';
6
7
  export declare class EmojiNodeDataProvider extends NodeDataProvider<EmojiDefinition, OptionalEmojiDescriptionWithVariations> {
7
8
  name: 'emojiNodeDataProvider';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-emoji",
3
- "version": "29.0.2",
3
+ "version": "30.0.1",
4
4
  "description": "Emoji plugin for @atlaskit/editor-core",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -24,24 +24,24 @@
24
24
  "@atlaskit/adf-schema": "^57.7.0",
25
25
  "@atlaskit/browser-apis": "^1.2.0",
26
26
  "@atlaskit/editor-json-transformer": "^10.0.0",
27
- "@atlaskit/editor-plugin-analytics": "^28.0.0",
28
- "@atlaskit/editor-plugin-annotation": "^28.1.0",
29
- "@atlaskit/editor-plugin-base": "^29.0.0",
30
- "@atlaskit/editor-plugin-connectivity": "^28.0.0",
31
- "@atlaskit/editor-plugin-editor-viewmode": "^30.0.0",
32
- "@atlaskit/editor-plugin-metrics": "^29.0.0",
33
- "@atlaskit/editor-plugin-type-ahead": "^29.0.0",
34
- "@atlaskit/editor-plugin-ui-control-registry": "^22.0.0",
27
+ "@atlaskit/editor-plugin-analytics": "^29.0.0",
28
+ "@atlaskit/editor-plugin-annotation": "^29.0.0",
29
+ "@atlaskit/editor-plugin-base": "^30.0.0",
30
+ "@atlaskit/editor-plugin-connectivity": "^29.0.0",
31
+ "@atlaskit/editor-plugin-editor-viewmode": "^31.0.0",
32
+ "@atlaskit/editor-plugin-metrics": "^30.0.0",
33
+ "@atlaskit/editor-plugin-type-ahead": "^30.0.0",
34
+ "@atlaskit/editor-plugin-ui-control-registry": "^23.0.0",
35
35
  "@atlaskit/editor-prosemirror": "^9.0.0",
36
36
  "@atlaskit/editor-shared-styles": "^4.5.0",
37
37
  "@atlaskit/editor-ui-control-model": "^2.10.0",
38
38
  "@atlaskit/emoji": "^73.0.0",
39
39
  "@atlaskit/icon": "^38.0.0",
40
- "@atlaskit/node-data-provider": "^29.0.0",
40
+ "@atlaskit/node-data-provider": "^30.0.0",
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": "^242.0.0",
44
+ "@atlaskit/tmp-editor-statsig": "^243.0.0",
45
45
  "@atlaskit/tokens": "^20.6.0",
46
46
  "@babel/runtime": "^7.0.0",
47
47
  "@emotion/react": "^11.7.1",
@@ -50,7 +50,7 @@
50
50
  "react-loadable": "^5.1.0"
51
51
  },
52
52
  "peerDependencies": {
53
- "@atlaskit/editor-common": "^132.0.0",
53
+ "@atlaskit/editor-common": "^133.1.0",
54
54
  "react": "^18.2.0 || ^19.2.0",
55
55
  "react-dom": "^18.2.0 || ^19.2.0",
56
56
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
@@ -68,9 +68,6 @@
68
68
  },
69
69
  "platform_editor_adf_with_localid": {
70
70
  "type": "boolean"
71
- },
72
- "platform_editor_custom_emoji_unicode_fallback": {
73
- "type": "boolean"
74
71
  }
75
72
  }
76
73
  }