@atlaskit/editor-plugin-selection 2.2.12 → 2.2.14

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-selection
2
2
 
3
+ ## 2.2.14
4
+
5
+ ### Patch Changes
6
+
7
+ - [#173895](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/173895)
8
+ [`6e123631d7c26`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6e123631d7c26) -
9
+ Clean up platform_editor_interaction_api_refactor
10
+ - Updated dependencies
11
+
12
+ ## 2.2.13
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+
3
18
  ## 2.2.12
4
19
 
5
20
  ### Patch Changes
@@ -71,14 +71,13 @@ var createPlugin = exports.createPlugin = function createPlugin(api, dispatch, d
71
71
  props: {
72
72
  createSelectionBetween: _createSelectionBetween.onCreateSelectionBetween,
73
73
  decorations: function decorations(state) {
74
- var _api$interaction, _api$interaction2;
75
- var hasHadInteraction = (api === null || api === void 0 || (_api$interaction = api.interaction) === null || _api$interaction === void 0 || (_api$interaction = _api$interaction.sharedState.currentState()) === null || _api$interaction === void 0 ? void 0 : _api$interaction.hasHadInteraction) !== false;
76
- var interactionState = api === null || api === void 0 || (_api$interaction2 = api.interaction) === null || _api$interaction2 === void 0 || (_api$interaction2 = _api$interaction2.sharedState.currentState()) === null || _api$interaction2 === void 0 ? void 0 : _api$interaction2.interactionState;
74
+ var _api$interaction;
75
+ var interactionState = api === null || api === void 0 || (_api$interaction = api.interaction) === null || _api$interaction === void 0 || (_api$interaction = _api$interaction.sharedState.currentState()) === null || _api$interaction === void 0 ? void 0 : _api$interaction.interactionState;
77
76
 
78
77
  // Do not show selection decorations for live pages where the user has not
79
78
  // interacted with the page. We do not show cursor until interaction and we do not
80
79
  // want to show selections either.
81
- if ((options.__livePage || (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && ((0, _platformFeatureFlags.fg)('platform_editor_interaction_api_refactor') ? interactionState === 'hasNotHadInteraction' : !hasHadInteraction) && (0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init')) {
80
+ if ((options.__livePage || (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && interactionState === 'hasNotHadInteraction' && (0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init')) {
82
81
  return _view.DecorationSet.empty;
83
82
  }
84
83
  return (0, _pluginFactory.getPluginState)(state).decorationSet;
@@ -64,14 +64,13 @@ export const createPlugin = (api, dispatch, dispatchAnalyticsEvent, options = {}
64
64
  props: {
65
65
  createSelectionBetween: onCreateSelectionBetween,
66
66
  decorations(state) {
67
- var _api$interaction, _api$interaction$shar, _api$interaction2, _api$interaction2$sha;
68
- const hasHadInteraction = (api === null || api === void 0 ? void 0 : (_api$interaction = api.interaction) === null || _api$interaction === void 0 ? void 0 : (_api$interaction$shar = _api$interaction.sharedState.currentState()) === null || _api$interaction$shar === void 0 ? void 0 : _api$interaction$shar.hasHadInteraction) !== false;
69
- const interactionState = api === null || api === void 0 ? void 0 : (_api$interaction2 = api.interaction) === null || _api$interaction2 === void 0 ? void 0 : (_api$interaction2$sha = _api$interaction2.sharedState.currentState()) === null || _api$interaction2$sha === void 0 ? void 0 : _api$interaction2$sha.interactionState;
67
+ var _api$interaction, _api$interaction$shar;
68
+ const interactionState = api === null || api === void 0 ? void 0 : (_api$interaction = api.interaction) === null || _api$interaction === void 0 ? void 0 : (_api$interaction$shar = _api$interaction.sharedState.currentState()) === null || _api$interaction$shar === void 0 ? void 0 : _api$interaction$shar.interactionState;
70
69
 
71
70
  // Do not show selection decorations for live pages where the user has not
72
71
  // interacted with the page. We do not show cursor until interaction and we do not
73
72
  // want to show selections either.
74
- if ((options.__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && (fg('platform_editor_interaction_api_refactor') ? interactionState === 'hasNotHadInteraction' : !hasHadInteraction) && fg('platform_editor_no_cursor_on_live_doc_init')) {
73
+ if ((options.__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && interactionState === 'hasNotHadInteraction' && fg('platform_editor_no_cursor_on_live_doc_init')) {
75
74
  return DecorationSet.empty;
76
75
  }
77
76
  return getPluginState(state).decorationSet;
@@ -65,14 +65,13 @@ export var createPlugin = function createPlugin(api, dispatch, dispatchAnalytics
65
65
  props: {
66
66
  createSelectionBetween: onCreateSelectionBetween,
67
67
  decorations: function decorations(state) {
68
- var _api$interaction, _api$interaction2;
69
- var hasHadInteraction = (api === null || api === void 0 || (_api$interaction = api.interaction) === null || _api$interaction === void 0 || (_api$interaction = _api$interaction.sharedState.currentState()) === null || _api$interaction === void 0 ? void 0 : _api$interaction.hasHadInteraction) !== false;
70
- var interactionState = api === null || api === void 0 || (_api$interaction2 = api.interaction) === null || _api$interaction2 === void 0 || (_api$interaction2 = _api$interaction2.sharedState.currentState()) === null || _api$interaction2 === void 0 ? void 0 : _api$interaction2.interactionState;
68
+ var _api$interaction;
69
+ var interactionState = api === null || api === void 0 || (_api$interaction = api.interaction) === null || _api$interaction === void 0 || (_api$interaction = _api$interaction.sharedState.currentState()) === null || _api$interaction === void 0 ? void 0 : _api$interaction.interactionState;
71
70
 
72
71
  // Do not show selection decorations for live pages where the user has not
73
72
  // interacted with the page. We do not show cursor until interaction and we do not
74
73
  // want to show selections either.
75
- if ((options.__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && (fg('platform_editor_interaction_api_refactor') ? interactionState === 'hasNotHadInteraction' : !hasHadInteraction) && fg('platform_editor_no_cursor_on_live_doc_init')) {
74
+ if ((options.__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && interactionState === 'hasNotHadInteraction' && fg('platform_editor_no_cursor_on_live_doc_init')) {
76
75
  return DecorationSet.empty;
77
76
  }
78
77
  return getPluginState(state).decorationSet;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-selection",
3
- "version": "2.2.12",
3
+ "version": "2.2.14",
4
4
  "description": "Selection plugin for @atlaskit/editor-core",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -20,14 +20,14 @@
20
20
  "runReact18": true
21
21
  },
22
22
  "dependencies": {
23
- "@atlaskit/editor-common": "^107.0.0",
24
- "@atlaskit/editor-plugin-interaction": "^2.0.0",
23
+ "@atlaskit/editor-common": "^107.1.0",
24
+ "@atlaskit/editor-plugin-interaction": "^3.0.0",
25
25
  "@atlaskit/editor-prosemirror": "7.0.0",
26
26
  "@atlaskit/editor-shared-styles": "^3.4.0",
27
27
  "@atlaskit/editor-tables": "^2.9.0",
28
28
  "@atlaskit/platform-feature-flags": "^1.1.0",
29
- "@atlaskit/tmp-editor-statsig": "^7.1.0",
30
- "@atlaskit/tokens": "^5.2.0",
29
+ "@atlaskit/tmp-editor-statsig": "^8.0.0",
30
+ "@atlaskit/tokens": "^5.4.0",
31
31
  "@babel/runtime": "^7.0.0"
32
32
  },
33
33
  "peerDependencies": {
@@ -90,9 +90,6 @@
90
90
  },
91
91
  "platform_editor_no_cursor_on_live_doc_init": {
92
92
  "type": "boolean"
93
- },
94
- "platform_editor_interaction_api_refactor": {
95
- "type": "boolean"
96
93
  }
97
94
  }
98
95
  }