@atlaskit/editor-plugin-selection-extension 5.0.1 → 5.0.2

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,11 @@
1
1
  # @atlaskit/editor-plugin-selection-extension
2
2
 
3
+ ## 5.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 5.0.1
4
10
 
5
11
  ### Patch Changes
@@ -151,6 +151,9 @@ var selectionExtensionPlugin = exports.selectionExtensionPlugin = function selec
151
151
  contentComponent: function contentComponent(_ref7) {
152
152
  var _api$analytics;
153
153
  var editorView = _ref7.editorView;
154
+ if (!editorView) {
155
+ return null;
156
+ }
154
157
  return /*#__PURE__*/_react.default.createElement(_SelectionExtensionComponentWrapper.SelectionExtensionComponentWrapper, {
155
158
  editorView: editorView,
156
159
  api: api,
@@ -173,7 +176,7 @@ var selectionExtensionPlugin = exports.selectionExtensionPlugin = function selec
173
176
 
174
177
  // Content Mode Validation
175
178
  // Check if pageModes is provided and matches against current content mode
176
- // This will eventially transition from mode to contentMode
179
+ // This will eventually transition from mode to contentMode
177
180
  var editorContentMode = api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 || (_api$editorViewMode = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.mode;
178
181
  if (pageModes) {
179
182
  // Early Exit: consumer has set pageModes but editorContentMode is undefined
@@ -148,6 +148,9 @@ export const selectionExtensionPlugin = ({
148
148
  editorView
149
149
  }) => {
150
150
  var _api$analytics;
151
+ if (!editorView) {
152
+ return null;
153
+ }
151
154
  return /*#__PURE__*/React.createElement(SelectionExtensionComponentWrapper, {
152
155
  editorView: editorView,
153
156
  api: api,
@@ -172,7 +175,7 @@ export const selectionExtensionPlugin = ({
172
175
 
173
176
  // Content Mode Validation
174
177
  // Check if pageModes is provided and matches against current content mode
175
- // This will eventially transition from mode to contentMode
178
+ // This will eventually transition from mode to contentMode
176
179
  const editorContentMode = api === null || api === void 0 ? void 0 : (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 ? void 0 : (_api$editorViewMode$s = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode$s === void 0 ? void 0 : _api$editorViewMode$s.mode;
177
180
  if (pageModes) {
178
181
  // Early Exit: consumer has set pageModes but editorContentMode is undefined
@@ -144,6 +144,9 @@ export var selectionExtensionPlugin = function selectionExtensionPlugin(_ref) {
144
144
  contentComponent: function contentComponent(_ref7) {
145
145
  var _api$analytics;
146
146
  var editorView = _ref7.editorView;
147
+ if (!editorView) {
148
+ return null;
149
+ }
147
150
  return /*#__PURE__*/React.createElement(SelectionExtensionComponentWrapper, {
148
151
  editorView: editorView,
149
152
  api: api,
@@ -166,7 +169,7 @@ export var selectionExtensionPlugin = function selectionExtensionPlugin(_ref) {
166
169
 
167
170
  // Content Mode Validation
168
171
  // Check if pageModes is provided and matches against current content mode
169
- // This will eventially transition from mode to contentMode
172
+ // This will eventually transition from mode to contentMode
170
173
  var editorContentMode = api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 || (_api$editorViewMode = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.mode;
171
174
  if (pageModes) {
172
175
  // Early Exit: consumer has set pageModes but editorContentMode is undefined
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-selection-extension",
3
- "version": "5.0.1",
3
+ "version": "5.0.2",
4
4
  "description": "editor-plugin-selection-extension plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,10 +32,10 @@
32
32
  ],
33
33
  "atlaskit:src": "src/index.ts",
34
34
  "dependencies": {
35
- "@atlaskit/adf-utils": "^19.21.0",
36
- "@atlaskit/editor-json-transformer": "^8.27.0",
37
- "@atlaskit/editor-plugin-analytics": "^5.0.0",
38
- "@atlaskit/editor-plugin-block-menu": "^3.0.0",
35
+ "@atlaskit/adf-utils": "^19.23.0",
36
+ "@atlaskit/editor-json-transformer": "^8.29.0",
37
+ "@atlaskit/editor-plugin-analytics": "^5.2.0",
38
+ "@atlaskit/editor-plugin-block-menu": "^3.1.0",
39
39
  "@atlaskit/editor-plugin-editor-viewmode": "^7.0.0",
40
40
  "@atlaskit/editor-plugin-primary-toolbar": "^6.0.0",
41
41
  "@atlaskit/editor-plugin-selection-toolbar": "^6.1.0",
@@ -44,19 +44,19 @@
44
44
  "@atlaskit/editor-prosemirror": "7.0.0",
45
45
  "@atlaskit/editor-shared-styles": "^3.6.0",
46
46
  "@atlaskit/editor-tables": "^2.9.0",
47
- "@atlaskit/editor-toolbar": "^0.8.0",
47
+ "@atlaskit/editor-toolbar": "^0.9.0",
48
48
  "@atlaskit/icon": "^28.1.0",
49
49
  "@atlaskit/platform-feature-flags": "^1.1.0",
50
50
  "@atlaskit/platform-feature-flags-react": "^0.3.0",
51
51
  "@atlaskit/primitives": "^14.14.0",
52
- "@atlaskit/tmp-editor-statsig": "^12.11.0",
52
+ "@atlaskit/tmp-editor-statsig": "^12.21.0",
53
53
  "@babel/runtime": "^7.0.0",
54
54
  "lodash": "^4.17.21",
55
55
  "react-intl-next": "npm:react-intl@^5.18.1",
56
56
  "uuid": "^3.1.0"
57
57
  },
58
58
  "peerDependencies": {
59
- "@atlaskit/editor-common": "^109.1.0",
59
+ "@atlaskit/editor-common": "^109.6.0",
60
60
  "react": "^18.2.0"
61
61
  },
62
62
  "devDependencies": {