@atlaskit/renderer 150.0.6 → 150.0.7

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,17 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 150.0.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [`ae36fe5fd60ff`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ae36fe5fd60ff) -
8
+ Expose a lightweight emoji fallback helper and reuse it in editor and renderer emoji components.
9
+ Preserve the behavior of platform_editor_custom_emoji_unicode_fallback without importing provider
10
+ or rendering code into consumers of the helper. Also expose lightweight mention-avatar eligibility
11
+ so consumers can preserve the existing hover-card and avatar experiment cohorts without importing
12
+ mention components.
13
+ - Updated dependencies
14
+
3
15
  ## 150.0.6
4
16
 
5
17
  ### Patch Changes
@@ -13,10 +13,10 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
13
13
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
14
14
  var _react = require("react");
15
15
  var _react2 = require("@emotion/react");
16
+ var _fallback = require("@atlaskit/editor-common/emoji/fallback");
16
17
  var _messages = require("@atlaskit/editor-common/emoji/messages");
17
18
  var _providerFactory = _interopRequireDefault(require("@atlaskit/editor-common/provider-factory/provider-factory"));
18
19
  var _withProviders = require("@atlaskit/editor-common/provider-factory/with-providers");
19
- var _isSingleEmoji = require("@atlaskit/editor-common/utils/isSingleEmoji");
20
20
  var _element = require("@atlaskit/emoji/element");
21
21
  var _fg = require("@atlaskit/platform-feature-flags/fg");
22
22
  var _useInlineAnnotationProps = require("../../ui/annotations/element/useInlineAnnotationProps");
@@ -49,8 +49,9 @@ var EmojiNode = /*#__PURE__*/function (_PureComponent) {
49
49
  // Character (U+FFFD) instead of the shortName text. Standard emojis
50
50
  // continue to fall back to their Unicode text representation.
51
51
  var fallbackText = fallback || shortName;
52
- var useReplacementChar = (0, _fg.fg)('platform_editor_custom_emoji_unicode_fallback') && !(0, _isSingleEmoji.isSingleEmoji)(fallbackText);
53
- var renderedFallbackText = useReplacementChar ? "\uFFFD" : fallbackText;
52
+ var _customFallback = (0, _fallback.getEmojiCustomFallback)(fallbackText);
53
+ var useReplacementChar = _customFallback !== undefined;
54
+ var renderedFallbackText = _customFallback !== null && _customFallback !== void 0 ? _customFallback : fallbackText;
54
55
  var accessibleLabel = "".concat(_messages.messages.emojiNodeLabel.defaultMessage, " ").concat(shortName);
55
56
  return (0, _react2.jsx)("span", {
56
57
  "aria-label": useReplacementChar ? accessibleLabel : undefined,
@@ -64,7 +65,7 @@ var EmojiNode = /*#__PURE__*/function (_PureComponent) {
64
65
  if (!providers.emojiProvider) {
65
66
  return null;
66
67
  }
67
- var customFallback = (0, _fg.fg)('platform_editor_custom_emoji_unicode_fallback') && !(0, _isSingleEmoji.isSingleEmoji)(fallback || shortName) ? "\uFFFD" : undefined;
68
+ var customFallback = (0, _fallback.getEmojiCustomFallback)(fallback || shortName);
68
69
  return (0, _react2.jsx)(_element.ResourcedEmoji
69
70
  // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
70
71
  , {
@@ -79,7 +79,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
79
79
  var TABLE_INFO_TIMEOUT = 10000;
80
80
  var RENDER_EVENT_SAMPLE_RATE = 0.1;
81
81
  var packageName = "@atlaskit/renderer";
82
- var packageVersion = "150.0.5";
82
+ var packageVersion = "150.0.6";
83
83
  var setAsQueryContainerStyles = (0, _react2.css)({
84
84
  containerName: 'ak-renderer-wrapper',
85
85
  containerType: 'inline-size'
@@ -7,10 +7,10 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
7
7
  import { PureComponent, memo } from 'react';
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { jsx } from '@emotion/react';
10
+ import { getEmojiCustomFallback } from '@atlaskit/editor-common/emoji/fallback';
10
11
  import { messages } from '@atlaskit/editor-common/emoji/messages';
11
12
  import ProviderFactory from '@atlaskit/editor-common/provider-factory/provider-factory';
12
13
  import { WithProviders } from '@atlaskit/editor-common/provider-factory/with-providers';
13
- import { isSingleEmoji } from '@atlaskit/editor-common/utils/isSingleEmoji';
14
14
  import { ResourcedEmoji } from '@atlaskit/emoji/element';
15
15
  import { fg } from '@atlaskit/platform-feature-flags/fg';
16
16
  import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
@@ -37,8 +37,9 @@ class EmojiNode extends PureComponent {
37
37
  // Character (U+FFFD) instead of the shortName text. Standard emojis
38
38
  // continue to fall back to their Unicode text representation.
39
39
  const fallbackText = fallback || shortName;
40
- const useReplacementChar = fg('platform_editor_custom_emoji_unicode_fallback') && !isSingleEmoji(fallbackText);
41
- const renderedFallbackText = useReplacementChar ? '\uFFFD' : fallbackText;
40
+ const customFallback = getEmojiCustomFallback(fallbackText);
41
+ const useReplacementChar = customFallback !== undefined;
42
+ const renderedFallbackText = customFallback !== null && customFallback !== void 0 ? customFallback : fallbackText;
42
43
  const accessibleLabel = `${messages.emojiNodeLabel.defaultMessage} ${shortName}`;
43
44
  return jsx("span", {
44
45
  "aria-label": useReplacementChar ? accessibleLabel : undefined,
@@ -52,7 +53,7 @@ class EmojiNode extends PureComponent {
52
53
  if (!providers.emojiProvider) {
53
54
  return null;
54
55
  }
55
- const customFallback = fg('platform_editor_custom_emoji_unicode_fallback') && !isSingleEmoji(fallback || shortName) ? '\uFFFD' : undefined;
56
+ const customFallback = getEmojiCustomFallback(fallback || shortName);
56
57
  return jsx(ResourcedEmoji
57
58
  // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
58
59
  , {
@@ -64,7 +64,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
64
64
  const TABLE_INFO_TIMEOUT = 10000;
65
65
  const RENDER_EVENT_SAMPLE_RATE = 0.1;
66
66
  const packageName = "@atlaskit/renderer";
67
- const packageVersion = "150.0.5";
67
+ const packageVersion = "150.0.6";
68
68
  const setAsQueryContainerStyles = css({
69
69
  containerName: 'ak-renderer-wrapper',
70
70
  containerType: 'inline-size'
@@ -14,10 +14,10 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
14
14
  import { PureComponent, memo } from 'react';
15
15
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
16
16
  import { jsx } from '@emotion/react';
17
+ import { getEmojiCustomFallback } from '@atlaskit/editor-common/emoji/fallback';
17
18
  import { messages } from '@atlaskit/editor-common/emoji/messages';
18
19
  import ProviderFactory from '@atlaskit/editor-common/provider-factory/provider-factory';
19
20
  import { WithProviders } from '@atlaskit/editor-common/provider-factory/with-providers';
20
- import { isSingleEmoji } from '@atlaskit/editor-common/utils/isSingleEmoji';
21
21
  import { ResourcedEmoji } from '@atlaskit/emoji/element';
22
22
  import { fg } from '@atlaskit/platform-feature-flags/fg';
23
23
  import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
@@ -45,8 +45,9 @@ var EmojiNode = /*#__PURE__*/function (_PureComponent) {
45
45
  // Character (U+FFFD) instead of the shortName text. Standard emojis
46
46
  // continue to fall back to their Unicode text representation.
47
47
  var fallbackText = fallback || shortName;
48
- var useReplacementChar = fg('platform_editor_custom_emoji_unicode_fallback') && !isSingleEmoji(fallbackText);
49
- var renderedFallbackText = useReplacementChar ? "\uFFFD" : fallbackText;
48
+ var _customFallback = getEmojiCustomFallback(fallbackText);
49
+ var useReplacementChar = _customFallback !== undefined;
50
+ var renderedFallbackText = _customFallback !== null && _customFallback !== void 0 ? _customFallback : fallbackText;
50
51
  var accessibleLabel = "".concat(messages.emojiNodeLabel.defaultMessage, " ").concat(shortName);
51
52
  return jsx("span", {
52
53
  "aria-label": useReplacementChar ? accessibleLabel : undefined,
@@ -60,7 +61,7 @@ var EmojiNode = /*#__PURE__*/function (_PureComponent) {
60
61
  if (!providers.emojiProvider) {
61
62
  return null;
62
63
  }
63
- var customFallback = fg('platform_editor_custom_emoji_unicode_fallback') && !isSingleEmoji(fallback || shortName) ? "\uFFFD" : undefined;
64
+ var customFallback = getEmojiCustomFallback(fallback || shortName);
64
65
  return jsx(ResourcedEmoji
65
66
  // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
66
67
  , {
@@ -69,7 +69,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
69
69
  var TABLE_INFO_TIMEOUT = 10000;
70
70
  var RENDER_EVENT_SAMPLE_RATE = 0.1;
71
71
  var packageName = "@atlaskit/renderer";
72
- var packageVersion = "150.0.5";
72
+ var packageVersion = "150.0.6";
73
73
  var setAsQueryContainerStyles = css({
74
74
  containerName: 'ak-renderer-wrapper',
75
75
  containerType: 'inline-size'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "150.0.6",
3
+ "version": "150.0.7",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -53,13 +53,13 @@
53
53
  "@atlaskit/feature-gate-js-client": "^7.0.0",
54
54
  "@atlaskit/icon": "^38.0.0",
55
55
  "@atlaskit/link": "^5.1.0",
56
- "@atlaskit/link-datasource": "^7.3.0",
56
+ "@atlaskit/link-datasource": "^7.5.0",
57
57
  "@atlaskit/link-extractors": "^5.0.0",
58
58
  "@atlaskit/linking-common": "^13.0.0",
59
59
  "@atlaskit/media-card": "^82.1.0",
60
- "@atlaskit/media-client": "^39.1.0",
60
+ "@atlaskit/media-client": "^39.2.0",
61
61
  "@atlaskit/media-client-react": "^7.0.0",
62
- "@atlaskit/media-common": "^14.6.0",
62
+ "@atlaskit/media-common": "^14.7.0",
63
63
  "@atlaskit/media-filmstrip": "^53.0.0",
64
64
  "@atlaskit/media-ui": "^31.3.0",
65
65
  "@atlaskit/media-viewer": "^54.11.0",
@@ -69,7 +69,7 @@
69
69
  "@atlaskit/pragmatic-drag-and-drop": "^4.0.0",
70
70
  "@atlaskit/react-compiler-gating": "^0.2.0",
71
71
  "@atlaskit/react-ufo": "^8.1.0",
72
- "@atlaskit/smart-card": "^46.6.0",
72
+ "@atlaskit/smart-card": "^46.7.0",
73
73
  "@atlaskit/status": "^5.13.0",
74
74
  "@atlaskit/task-decision": "^21.12.0",
75
75
  "@atlaskit/theme": "^28.2.0",
@@ -88,7 +88,7 @@
88
88
  "uuid": "^11.1.1"
89
89
  },
90
90
  "peerDependencies": {
91
- "@atlaskit/editor-common": "^131.2.0",
91
+ "@atlaskit/editor-common": "^131.5.0",
92
92
  "@atlaskit/link-provider": "^6.0.0",
93
93
  "@atlaskit/media-core": "^39.0.0",
94
94
  "react": "^18.2.0 || ^19.2.0",
@@ -100,7 +100,7 @@
100
100
  "@af/visual-regression": "workspace:^",
101
101
  "@atlaskit/analytics-gas-types": "^6.2.0",
102
102
  "@atlaskit/checkbox": "^19.3.0",
103
- "@atlaskit/editor-plugin-media": "^29.0.0",
103
+ "@atlaskit/editor-plugin-media": "^29.1.0",
104
104
  "@atlaskit/editor-test-helpers": "workspace:^",
105
105
  "@atlaskit/inline-edit": "^16.4.0",
106
106
  "@atlaskit/json-ld-types": "^2.0.0",
@@ -113,8 +113,8 @@
113
113
  "@atlaskit/media-test-helpers": "^43.0.0",
114
114
  "@atlaskit/mention": "^30.2.0",
115
115
  "@atlaskit/modal-dialog": "^17.0.0",
116
- "@atlaskit/navigation-system": "^11.2.0",
117
- "@atlaskit/primitives": "^22.5.0",
116
+ "@atlaskit/navigation-system": "^11.3.0",
117
+ "@atlaskit/primitives": "^22.6.0",
118
118
  "@atlaskit/profilecard": "^27.1.0",
119
119
  "@atlaskit/radio": "^10.2.0",
120
120
  "@atlaskit/range": "^12.2.0",
@@ -129,7 +129,7 @@
129
129
  "@atlassian/experiment-test-utils": "^0.2.0",
130
130
  "@atlassian/feature-flags-test-utils": "^1.3.0",
131
131
  "@atlassian/structured-docs-types": "workspace:^",
132
- "@atlassian/testing-library": "^0.11.0",
132
+ "@atlassian/testing-library": "^0.12.0",
133
133
  "@atlassian/workbench": "workspace:*",
134
134
  "@testing-library/react": "^16.3.0",
135
135
  "@testing-library/user-event": "^14.4.3",