@atlaskit/editor-plugin-selection-extension 6.0.8 → 6.0.10

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-extension
2
2
 
3
+ ## 6.0.10
4
+
5
+ ### Patch Changes
6
+
7
+ - [`33820db9a729b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/33820db9a729b) -
8
+ [NO-ISSUE] Rename references to the view mode (editting or viewing) from "content mode" to "view
9
+ mode" to prevent confusion with the new contentMode feature
10
+ - Updated dependencies
11
+
12
+ ## 6.0.9
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+
3
18
  ## 6.0.8
4
19
 
5
20
  ### Patch Changes
@@ -175,19 +175,19 @@ var selectionExtensionPlugin = exports.selectionExtensionPlugin = function selec
175
175
 
176
176
  // Content Mode Validation
177
177
  // Check if pageModes is provided and matches against current content mode
178
- // This will eventually transition from mode to contentMode
179
- 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
+ // This will eventually transition from mode to viewMode
179
+ var editorViewMode = 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;
180
180
  if (pageModes) {
181
- // Early Exit: consumer has set pageModes but editorContentMode is undefined
182
- if (!editorContentMode) {
181
+ // Early Exit: consumer has set pageModes but editorViewMode is undefined
182
+ if (!editorViewMode) {
183
183
  return;
184
184
  }
185
185
 
186
186
  // Simplify traversion of pageModes which can be string or array of strings
187
187
  var showOnModesCollection = Array.isArray(pageModes) ? pageModes : [pageModes];
188
188
 
189
- // Early Exit: consumer has set pageModes but current editorContentMode is not in the collection
190
- if (!showOnModesCollection.includes(editorContentMode)) {
189
+ // Early Exit: consumer has set pageModes but current editorViewMode is not in the collection
190
+ if (!showOnModesCollection.includes(editorViewMode)) {
191
191
  return;
192
192
  }
193
193
  }
@@ -174,19 +174,19 @@ export const selectionExtensionPlugin = ({
174
174
 
175
175
  // Content Mode Validation
176
176
  // Check if pageModes is provided and matches against current content mode
177
- // This will eventually transition from mode to contentMode
178
- 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
+ // This will eventually transition from mode to viewMode
178
+ const editorViewMode = 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;
179
179
  if (pageModes) {
180
- // Early Exit: consumer has set pageModes but editorContentMode is undefined
181
- if (!editorContentMode) {
180
+ // Early Exit: consumer has set pageModes but editorViewMode is undefined
181
+ if (!editorViewMode) {
182
182
  return;
183
183
  }
184
184
 
185
185
  // Simplify traversion of pageModes which can be string or array of strings
186
186
  const showOnModesCollection = Array.isArray(pageModes) ? pageModes : [pageModes];
187
187
 
188
- // Early Exit: consumer has set pageModes but current editorContentMode is not in the collection
189
- if (!showOnModesCollection.includes(editorContentMode)) {
188
+ // Early Exit: consumer has set pageModes but current editorViewMode is not in the collection
189
+ if (!showOnModesCollection.includes(editorViewMode)) {
190
190
  return;
191
191
  }
192
192
  }
@@ -168,19 +168,19 @@ export var selectionExtensionPlugin = function selectionExtensionPlugin(_ref) {
168
168
 
169
169
  // Content Mode Validation
170
170
  // Check if pageModes is provided and matches against current content mode
171
- // This will eventually transition from mode to contentMode
172
- 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
+ // This will eventually transition from mode to viewMode
172
+ var editorViewMode = 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;
173
173
  if (pageModes) {
174
- // Early Exit: consumer has set pageModes but editorContentMode is undefined
175
- if (!editorContentMode) {
174
+ // Early Exit: consumer has set pageModes but editorViewMode is undefined
175
+ if (!editorViewMode) {
176
176
  return;
177
177
  }
178
178
 
179
179
  // Simplify traversion of pageModes which can be string or array of strings
180
180
  var showOnModesCollection = Array.isArray(pageModes) ? pageModes : [pageModes];
181
181
 
182
- // Early Exit: consumer has set pageModes but current editorContentMode is not in the collection
183
- if (!showOnModesCollection.includes(editorContentMode)) {
182
+ // Early Exit: consumer has set pageModes but current editorViewMode is not in the collection
183
+ if (!showOnModesCollection.includes(editorViewMode)) {
184
184
  return;
185
185
  }
186
186
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-selection-extension",
3
- "version": "6.0.8",
3
+ "version": "6.0.10",
4
4
  "description": "editor-plugin-selection-extension plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -39,7 +39,7 @@
39
39
  "@atlaskit/editor-plugin-editor-viewmode": "^8.0.0",
40
40
  "@atlaskit/editor-plugin-primary-toolbar": "^7.0.0",
41
41
  "@atlaskit/editor-plugin-selection-toolbar": "^7.0.0",
42
- "@atlaskit/editor-plugin-toolbar": "^3.2.0",
42
+ "@atlaskit/editor-plugin-toolbar": "^3.3.0",
43
43
  "@atlaskit/editor-plugin-user-preferences": "^4.0.0",
44
44
  "@atlaskit/editor-prosemirror": "7.0.0",
45
45
  "@atlaskit/editor-shared-styles": "^3.7.0",
@@ -48,7 +48,7 @@
48
48
  "@atlaskit/icon": "^28.5.0",
49
49
  "@atlaskit/platform-feature-flags": "^1.1.0",
50
50
  "@atlaskit/platform-feature-flags-react": "^0.3.0",
51
- "@atlaskit/primitives": "^14.15.0",
51
+ "@atlaskit/primitives": "^15.0.0",
52
52
  "@atlaskit/tmp-editor-statsig": "^13.10.0",
53
53
  "@babel/runtime": "^7.0.0",
54
54
  "lodash": "^4.17.21",
@@ -56,7 +56,7 @@
56
56
  "uuid": "^3.1.0"
57
57
  },
58
58
  "peerDependencies": {
59
- "@atlaskit/editor-common": "^110.10.0",
59
+ "@atlaskit/editor-common": "^110.12.0",
60
60
  "react": "^18.2.0"
61
61
  },
62
62
  "devDependencies": {