@atlaskit/editor-plugin-insert-block 1.8.3 → 1.9.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,26 @@
1
1
  # @atlaskit/editor-plugin-insert-block
2
2
 
3
+ ## 1.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#130825](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/130825)
8
+ [`d8a00de5637ff`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d8a00de5637ff) -
9
+ ENGHEALTH-9890: Bumps React peer dependency for Lego editor plugins
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 1.8.4
16
+
17
+ ### Patch Changes
18
+
19
+ - [#128285](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/128285)
20
+ [`3524d5de72b7d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3524d5de72b7d) -
21
+ [ED-24545] Hide Turn into dropdown when selection is nested
22
+ - Updated dependencies
23
+
3
24
  ## 1.8.3
4
25
 
5
26
  ### Patch Changes
@@ -123,9 +123,10 @@ var insertBlockPlugin = exports.insertBlockPlugin = function insertBlockPlugin(_
123
123
  // as relevant plugin dependencies are already set up.
124
124
  // If we decide to ship the feature, we will consider a separate plugin if needed.
125
125
  // Experiment one-pager: https://hello.atlassian.net/wiki/spaces/ETM/pages/3931754727/Experiment+Elements+Basic+Text+Transformations
126
- selectionToolbar: function selectionToolbar(_, intl) {
126
+ selectionToolbar: function selectionToolbar(state, intl) {
127
127
  var _api$featureFlags;
128
- if (!(api !== null && api !== void 0 && (_api$featureFlags = api.featureFlags) !== null && _api$featureFlags !== void 0 && (_api$featureFlags = _api$featureFlags.sharedState.currentState()) !== null && _api$featureFlags !== void 0 && _api$featureFlags.basicTextTransformations)) {
128
+ var $from = state.selection.$from;
129
+ if (!(api !== null && api !== void 0 && (_api$featureFlags = api.featureFlags) !== null && _api$featureFlags !== void 0 && (_api$featureFlags = _api$featureFlags.sharedState.currentState()) !== null && _api$featureFlags !== void 0 && _api$featureFlags.basicTextTransformations) || $from.depth !== 1) {
129
130
  return;
130
131
  }
131
132
  var formatMessage = intl.formatMessage;
@@ -112,9 +112,14 @@ export const insertBlockPlugin = ({
112
112
  // as relevant plugin dependencies are already set up.
113
113
  // If we decide to ship the feature, we will consider a separate plugin if needed.
114
114
  // Experiment one-pager: https://hello.atlassian.net/wiki/spaces/ETM/pages/3931754727/Experiment+Elements+Basic+Text+Transformations
115
- selectionToolbar: (_, intl) => {
115
+ selectionToolbar: (state, intl) => {
116
116
  var _api$featureFlags, _api$featureFlags$sha;
117
- if (!(api !== null && api !== void 0 && (_api$featureFlags = api.featureFlags) !== null && _api$featureFlags !== void 0 && (_api$featureFlags$sha = _api$featureFlags.sharedState.currentState()) !== null && _api$featureFlags$sha !== void 0 && _api$featureFlags$sha.basicTextTransformations)) {
117
+ const {
118
+ selection: {
119
+ $from
120
+ }
121
+ } = state;
122
+ if (!(api !== null && api !== void 0 && (_api$featureFlags = api.featureFlags) !== null && _api$featureFlags !== void 0 && (_api$featureFlags$sha = _api$featureFlags.sharedState.currentState()) !== null && _api$featureFlags$sha !== void 0 && _api$featureFlags$sha.basicTextTransformations) || $from.depth !== 1) {
118
123
  return;
119
124
  }
120
125
  const {
@@ -113,9 +113,10 @@ export var insertBlockPlugin = function insertBlockPlugin(_ref) {
113
113
  // as relevant plugin dependencies are already set up.
114
114
  // If we decide to ship the feature, we will consider a separate plugin if needed.
115
115
  // Experiment one-pager: https://hello.atlassian.net/wiki/spaces/ETM/pages/3931754727/Experiment+Elements+Basic+Text+Transformations
116
- selectionToolbar: function selectionToolbar(_, intl) {
116
+ selectionToolbar: function selectionToolbar(state, intl) {
117
117
  var _api$featureFlags;
118
- if (!(api !== null && api !== void 0 && (_api$featureFlags = api.featureFlags) !== null && _api$featureFlags !== void 0 && (_api$featureFlags = _api$featureFlags.sharedState.currentState()) !== null && _api$featureFlags !== void 0 && _api$featureFlags.basicTextTransformations)) {
118
+ var $from = state.selection.$from;
119
+ if (!(api !== null && api !== void 0 && (_api$featureFlags = api.featureFlags) !== null && _api$featureFlags !== void 0 && (_api$featureFlags = _api$featureFlags.sharedState.currentState()) !== null && _api$featureFlags !== void 0 && _api$featureFlags.basicTextTransformations) || $from.depth !== 1) {
119
120
  return;
120
121
  }
121
122
  var formatMessage = intl.formatMessage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-insert-block",
3
- "version": "1.8.3",
3
+ "version": "1.9.0",
4
4
  "description": "Insert block plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,37 +33,37 @@
33
33
  ".": "./src/index.ts"
34
34
  },
35
35
  "dependencies": {
36
- "@atlaskit/editor-common": "^87.6.0",
36
+ "@atlaskit/editor-common": "^87.12.0",
37
37
  "@atlaskit/editor-plugin-analytics": "^1.7.0",
38
- "@atlaskit/editor-plugin-block-type": "^3.12.0",
38
+ "@atlaskit/editor-plugin-block-type": "^3.13.0",
39
39
  "@atlaskit/editor-plugin-code-block": "^3.3.0",
40
40
  "@atlaskit/editor-plugin-date": "^2.3.0",
41
41
  "@atlaskit/editor-plugin-emoji": "^2.3.0",
42
- "@atlaskit/editor-plugin-expand": "^2.3.0",
43
- "@atlaskit/editor-plugin-extension": "^1.13.0",
42
+ "@atlaskit/editor-plugin-expand": "^2.5.0",
43
+ "@atlaskit/editor-plugin-extension": "^1.14.0",
44
44
  "@atlaskit/editor-plugin-feature-flags": "^1.2.0",
45
45
  "@atlaskit/editor-plugin-hyperlink": "^2.8.0",
46
46
  "@atlaskit/editor-plugin-image-upload": "^1.2.0",
47
47
  "@atlaskit/editor-plugin-layout": "^1.7.0",
48
- "@atlaskit/editor-plugin-media": "^1.28.0",
48
+ "@atlaskit/editor-plugin-media": "^1.29.0",
49
49
  "@atlaskit/editor-plugin-mentions": "^2.3.0",
50
50
  "@atlaskit/editor-plugin-panel": "^2.3.0",
51
51
  "@atlaskit/editor-plugin-placeholder-text": "^1.7.0",
52
52
  "@atlaskit/editor-plugin-primary-toolbar": "^2.0.0",
53
- "@atlaskit/editor-plugin-quick-insert": "^1.2.0",
53
+ "@atlaskit/editor-plugin-quick-insert": "^1.3.0",
54
54
  "@atlaskit/editor-plugin-rule": "^1.8.0",
55
55
  "@atlaskit/editor-plugin-status": "^2.4.0",
56
56
  "@atlaskit/editor-plugin-table": "^7.25.0",
57
57
  "@atlaskit/editor-plugin-tasks-and-decisions": "^2.4.0",
58
- "@atlaskit/editor-plugin-type-ahead": "^1.7.0",
58
+ "@atlaskit/editor-plugin-type-ahead": "^1.8.0",
59
59
  "@atlaskit/editor-prosemirror": "5.0.1",
60
60
  "@atlaskit/editor-shared-styles": "^2.13.0",
61
61
  "@atlaskit/emoji": "^67.7.0",
62
- "@atlaskit/icon": "^22.11.0",
62
+ "@atlaskit/icon": "^22.13.0",
63
63
  "@atlaskit/platform-feature-flags": "^0.3.0",
64
64
  "@atlaskit/primitives": "^12.0.0",
65
- "@atlaskit/theme": "^12.11.0",
66
- "@atlaskit/tokens": "^1.57.0",
65
+ "@atlaskit/theme": "^13.0.0",
66
+ "@atlaskit/tokens": "^1.58.0",
67
67
  "@babel/runtime": "^7.0.0",
68
68
  "@emotion/react": "^11.7.1",
69
69
  "bind-event-listener": "^3.0.0",
@@ -71,8 +71,8 @@
71
71
  "memoize-one": "^6.0.0"
72
72
  },
73
73
  "peerDependencies": {
74
- "react": "^16.8.0",
75
- "react-dom": "^16.8.0",
74
+ "react": "^16.8.0 || ^17.0.0 || ~18.2.0",
75
+ "react-dom": "^16.8.0 || ^17.0.0 || ~18.2.0",
76
76
  "react-intl-next": "npm:react-intl@^5.18.1"
77
77
  },
78
78
  "devDependencies": {