@atlaskit/editor-plugin-emoji 18.0.8 → 19.0.0

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,21 @@
1
1
  # @atlaskit/editor-plugin-emoji
2
2
 
3
+ ## 19.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 18.0.9
10
+
11
+ ### Patch Changes
12
+
13
+ - [`962e8dc0188bf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/962e8dc0188bf) -
14
+ Clean up `platform_editor_offline_editing_web` with `isEnabled: true` for Confluence, keeping
15
+ offline editing and recovery behavior enabled. Remove the retired experiment from the editor
16
+ Statsig configuration; consumers must stop querying or overriding this experiment.
17
+ - Updated dependencies
18
+
3
19
  ## 18.0.8
4
20
 
5
21
  ### Patch Changes
@@ -26,7 +26,6 @@ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-ex
26
26
  var _fg = require("@atlaskit/platform-feature-flags/fg");
27
27
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
28
28
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
29
- var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
30
29
  var _emojiNodeSpec = require("./emojiNodeSpec");
31
30
  var SINGLE_EMOJI_REGEX =
32
31
  // Regular expression to match a single emoji character
@@ -151,7 +150,7 @@ var EmojiNodeView = exports.EmojiNodeView = /*#__PURE__*/function () {
151
150
  var subscribeToConnection = api === null || api === void 0 || (_api$connectivity = api.connectivity) === null || _api$connectivity === void 0 ? void 0 : _api$connectivity.sharedState.onChange(function (_ref3) {
152
151
  var prevSharedState = _ref3.prevSharedState,
153
152
  nextSharedState = _ref3.nextSharedState;
154
- if ((0, _editorPluginConnectivity.isOfflineMode)(prevSharedState === null || prevSharedState === void 0 ? void 0 : prevSharedState.mode) && (nextSharedState === null || nextSharedState === void 0 ? void 0 : nextSharedState.mode) === 'online' && _this.renderingFallback && (0, _editorExperiment.editorExperiment)('platform_editor_offline_editing_web', true)) {
153
+ if ((0, _editorPluginConnectivity.isOfflineMode)(prevSharedState === null || prevSharedState === void 0 ? void 0 : prevSharedState.mode) && (nextSharedState === null || nextSharedState === void 0 ? void 0 : nextSharedState.mode) === 'online' && _this.renderingFallback) {
155
154
  var _sharedState$currentS2;
156
155
  _this.updateDom((_sharedState$currentS2 = sharedState.currentState()) === null || _sharedState$currentS2 === void 0 ? void 0 : _sharedState$currentS2.emojiProvider);
157
156
  }
@@ -468,17 +467,13 @@ var EmojiNodeView = exports.EmojiNodeView = /*#__PURE__*/function () {
468
467
  imageElement.style.objectFit = 'contain';
469
468
  imageElement.height = _emoji.defaultEmojiHeight;
470
469
  imageElement.onerror = function () {
471
- if ((0, _editorExperiment.editorExperiment)('platform_editor_offline_editing_web', true)) {
472
- // If there's an error (ie. offline) render the ascii fallback if possible, otherwise
473
- // mark the node to refresh when returning online.
474
- // Create a check that confirms if this.node.attrs.text if an ascii emoji
475
- if (isSingleEmoji(_this3.node.attrs.text)) {
476
- _this3.renderFallback();
477
- } else {
478
- _this3.renderingFallback = true;
479
- }
480
- } else {
470
+ // If there's an error (ie. offline) render the ascii fallback if possible, otherwise
471
+ // mark the node to refresh when returning online.
472
+ // Create a check that confirms if this.node.attrs.text if an ascii emoji
473
+ if (isSingleEmoji(_this3.node.attrs.text)) {
481
474
  _this3.renderFallback();
475
+ } else {
476
+ _this3.renderingFallback = true;
482
477
  }
483
478
  };
484
479
  return imageElement;
@@ -14,7 +14,6 @@ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-e
14
14
  import { fg } from '@atlaskit/platform-feature-flags/fg';
15
15
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
16
16
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
17
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
18
17
  import { emojiToDom } from './emojiNodeSpec';
19
18
  const SINGLE_EMOJI_REGEX =
20
19
  // Regular expression to match a single emoji character
@@ -160,7 +159,7 @@ export class EmojiNodeView {
160
159
  prevSharedState,
161
160
  nextSharedState
162
161
  }) => {
163
- if (isOfflineMode(prevSharedState === null || prevSharedState === void 0 ? void 0 : prevSharedState.mode) && (nextSharedState === null || nextSharedState === void 0 ? void 0 : nextSharedState.mode) === 'online' && this.renderingFallback && editorExperiment('platform_editor_offline_editing_web', true)) {
162
+ if (isOfflineMode(prevSharedState === null || prevSharedState === void 0 ? void 0 : prevSharedState.mode) && (nextSharedState === null || nextSharedState === void 0 ? void 0 : nextSharedState.mode) === 'online' && this.renderingFallback) {
164
163
  var _sharedState$currentS2;
165
164
  this.updateDom((_sharedState$currentS2 = sharedState.currentState()) === null || _sharedState$currentS2 === void 0 ? void 0 : _sharedState$currentS2.emojiProvider);
166
165
  }
@@ -424,17 +423,13 @@ export class EmojiNodeView {
424
423
  imageElement.style.objectFit = 'contain';
425
424
  imageElement.height = defaultEmojiHeight;
426
425
  imageElement.onerror = () => {
427
- if (editorExperiment('platform_editor_offline_editing_web', true)) {
428
- // If there's an error (ie. offline) render the ascii fallback if possible, otherwise
429
- // mark the node to refresh when returning online.
430
- // Create a check that confirms if this.node.attrs.text if an ascii emoji
431
- if (isSingleEmoji(this.node.attrs.text)) {
432
- this.renderFallback();
433
- } else {
434
- this.renderingFallback = true;
435
- }
436
- } else {
426
+ // If there's an error (ie. offline) render the ascii fallback if possible, otherwise
427
+ // mark the node to refresh when returning online.
428
+ // Create a check that confirms if this.node.attrs.text if an ascii emoji
429
+ if (isSingleEmoji(this.node.attrs.text)) {
437
430
  this.renderFallback();
431
+ } else {
432
+ this.renderingFallback = true;
438
433
  }
439
434
  };
440
435
  return imageElement;
@@ -18,7 +18,6 @@ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-e
18
18
  import { fg } from '@atlaskit/platform-feature-flags/fg';
19
19
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
20
20
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
21
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
22
21
  import { emojiToDom } from './emojiNodeSpec';
23
22
  var SINGLE_EMOJI_REGEX =
24
23
  // Regular expression to match a single emoji character
@@ -143,7 +142,7 @@ export var EmojiNodeView = /*#__PURE__*/function () {
143
142
  var subscribeToConnection = api === null || api === void 0 || (_api$connectivity = api.connectivity) === null || _api$connectivity === void 0 ? void 0 : _api$connectivity.sharedState.onChange(function (_ref3) {
144
143
  var prevSharedState = _ref3.prevSharedState,
145
144
  nextSharedState = _ref3.nextSharedState;
146
- if (isOfflineMode(prevSharedState === null || prevSharedState === void 0 ? void 0 : prevSharedState.mode) && (nextSharedState === null || nextSharedState === void 0 ? void 0 : nextSharedState.mode) === 'online' && _this.renderingFallback && editorExperiment('platform_editor_offline_editing_web', true)) {
145
+ if (isOfflineMode(prevSharedState === null || prevSharedState === void 0 ? void 0 : prevSharedState.mode) && (nextSharedState === null || nextSharedState === void 0 ? void 0 : nextSharedState.mode) === 'online' && _this.renderingFallback) {
147
146
  var _sharedState$currentS2;
148
147
  _this.updateDom((_sharedState$currentS2 = sharedState.currentState()) === null || _sharedState$currentS2 === void 0 ? void 0 : _sharedState$currentS2.emojiProvider);
149
148
  }
@@ -460,17 +459,13 @@ export var EmojiNodeView = /*#__PURE__*/function () {
460
459
  imageElement.style.objectFit = 'contain';
461
460
  imageElement.height = defaultEmojiHeight;
462
461
  imageElement.onerror = function () {
463
- if (editorExperiment('platform_editor_offline_editing_web', true)) {
464
- // If there's an error (ie. offline) render the ascii fallback if possible, otherwise
465
- // mark the node to refresh when returning online.
466
- // Create a check that confirms if this.node.attrs.text if an ascii emoji
467
- if (isSingleEmoji(_this3.node.attrs.text)) {
468
- _this3.renderFallback();
469
- } else {
470
- _this3.renderingFallback = true;
471
- }
472
- } else {
462
+ // If there's an error (ie. offline) render the ascii fallback if possible, otherwise
463
+ // mark the node to refresh when returning online.
464
+ // Create a check that confirms if this.node.attrs.text if an ascii emoji
465
+ if (isSingleEmoji(_this3.node.attrs.text)) {
473
466
  _this3.renderFallback();
467
+ } else {
468
+ _this3.renderingFallback = true;
474
469
  }
475
470
  };
476
471
  return imageElement;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-emoji",
3
- "version": "18.0.8",
3
+ "version": "19.0.0",
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.4.0",
25
25
  "@atlaskit/browser-apis": "^1.2.0",
26
26
  "@atlaskit/editor-json-transformer": "^9.8.0",
27
- "@atlaskit/editor-plugin-analytics": "^17.0.0",
28
- "@atlaskit/editor-plugin-annotation": "^17.0.0",
29
- "@atlaskit/editor-plugin-base": "^18.0.0",
30
- "@atlaskit/editor-plugin-connectivity": "^17.0.0",
31
- "@atlaskit/editor-plugin-editor-viewmode": "^19.0.0",
32
- "@atlaskit/editor-plugin-metrics": "^18.0.0",
33
- "@atlaskit/editor-plugin-type-ahead": "^18.0.0",
34
- "@atlaskit/editor-plugin-ui-control-registry": "^11.0.0",
27
+ "@atlaskit/editor-plugin-analytics": "^18.0.0",
28
+ "@atlaskit/editor-plugin-annotation": "^18.0.0",
29
+ "@atlaskit/editor-plugin-base": "^19.0.0",
30
+ "@atlaskit/editor-plugin-connectivity": "^18.0.0",
31
+ "@atlaskit/editor-plugin-editor-viewmode": "^20.0.0",
32
+ "@atlaskit/editor-plugin-metrics": "^19.0.0",
33
+ "@atlaskit/editor-plugin-type-ahead": "^19.0.0",
34
+ "@atlaskit/editor-plugin-ui-control-registry": "^12.0.0",
35
35
  "@atlaskit/editor-prosemirror": "^8.0.0",
36
36
  "@atlaskit/editor-shared-styles": "^4.2.0",
37
37
  "@atlaskit/editor-ui-control-model": "^2.9.0",
38
38
  "@atlaskit/emoji": "^72.3.0",
39
39
  "@atlaskit/icon": "^37.6.0",
40
- "@atlaskit/node-data-provider": "^18.0.0",
40
+ "@atlaskit/node-data-provider": "^19.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": "^187.0.0",
44
+ "@atlaskit/tmp-editor-statsig": "^188.0.0",
45
45
  "@atlaskit/tokens": "^16.12.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": "^121.4.0",
53
+ "@atlaskit/editor-common": "^122.0.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"