@atlaskit/editor-plugin-floating-toolbar 3.6.1 → 4.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 +33 -0
- package/dist/cjs/floatingToolbarPlugin.js +30 -8
- package/dist/cjs/ui/Toolbar.js +2 -1
- package/dist/es2019/floatingToolbarPlugin.js +31 -8
- package/dist/es2019/ui/Toolbar.js +2 -1
- package/dist/esm/floatingToolbarPlugin.js +30 -8
- package/dist/esm/ui/Toolbar.js +2 -1
- package/dist/types/floatingToolbarPluginType.d.ts +5 -3
- package/dist/types-ts4.5/floatingToolbarPluginType.d.ts +5 -3
- package/package.json +15 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-floating-toolbar
|
|
2
2
|
|
|
3
|
+
## 4.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#143960](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/143960)
|
|
8
|
+
[`e1bf8964b3cf8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e1bf8964b3cf8) -
|
|
9
|
+
Adding press interaction performance tracking to Comment action in floating toolbar. No UI change.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 4.0.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#140969](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/140969)
|
|
17
|
+
[`b4ac22e73d43c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b4ac22e73d43c) -
|
|
18
|
+
[ux] [ED-27253] hide selection states until editor has been interacted with
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
21
|
+
## 4.0.0
|
|
22
|
+
|
|
23
|
+
### Major Changes
|
|
24
|
+
|
|
25
|
+
- [#141095](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/141095)
|
|
26
|
+
[`c12941b65dc2a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c12941b65dc2a) -
|
|
27
|
+
**WHAT**: Remove `@atlaskit/editor-plugin-block-controls` as a dependency from
|
|
28
|
+
`@atlaskit/editor-plugin-floating-toolbar`. Add `@atlaskit/editor-plugin-user-intent` as a
|
|
29
|
+
dependency and replace isDragging check from block controls with this user intention current
|
|
30
|
+
intention check.
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- Updated dependencies
|
|
35
|
+
|
|
3
36
|
## 3.6.1
|
|
4
37
|
|
|
5
38
|
### Patch Changes
|
|
@@ -174,11 +174,19 @@ var floatingToolbarPlugin = exports.floatingToolbarPlugin = function floatingToo
|
|
|
174
174
|
}
|
|
175
175
|
},
|
|
176
176
|
getSharedState: function getSharedState(editorState) {
|
|
177
|
-
var
|
|
177
|
+
var _api$interaction;
|
|
178
178
|
if (!editorState) {
|
|
179
179
|
return undefined;
|
|
180
180
|
}
|
|
181
|
-
var
|
|
181
|
+
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;
|
|
182
|
+
var configWithNodeInfo;
|
|
183
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_no_selection_until_interaction')) {
|
|
184
|
+
var _pluginKey$getState$g, _pluginKey$getState, _pluginKey$getState$g2;
|
|
185
|
+
configWithNodeInfo = hasHadInteraction !== false ? (_pluginKey$getState$g = (_pluginKey$getState = pluginKey.getState(editorState)) === null || _pluginKey$getState === void 0 || (_pluginKey$getState$g2 = _pluginKey$getState.getConfigWithNodeInfo) === null || _pluginKey$getState$g2 === void 0 ? void 0 : _pluginKey$getState$g2.call(_pluginKey$getState, editorState)) !== null && _pluginKey$getState$g !== void 0 ? _pluginKey$getState$g : undefined : undefined;
|
|
186
|
+
} else {
|
|
187
|
+
var _pluginKey$getState$g3, _pluginKey$getState2, _pluginKey$getState2$;
|
|
188
|
+
configWithNodeInfo = (_pluginKey$getState$g3 = (_pluginKey$getState2 = pluginKey.getState(editorState)) === null || _pluginKey$getState2 === void 0 || (_pluginKey$getState2$ = _pluginKey$getState2.getConfigWithNodeInfo) === null || _pluginKey$getState2$ === void 0 ? void 0 : _pluginKey$getState2$.call(_pluginKey$getState2, editorState)) !== null && _pluginKey$getState$g3 !== void 0 ? _pluginKey$getState$g3 : undefined;
|
|
189
|
+
}
|
|
182
190
|
return {
|
|
183
191
|
configWithNodeInfo: configWithNodeInfo,
|
|
184
192
|
floatingToolbarData: _pluginKey.pluginKey.getState(editorState)
|
|
@@ -212,10 +220,13 @@ function ContentComponent(_ref5) {
|
|
|
212
220
|
popupsScrollableElement = _ref5.popupsScrollableElement,
|
|
213
221
|
providerFactory = _ref5.providerFactory,
|
|
214
222
|
dispatchAnalyticsEvent = _ref5.dispatchAnalyticsEvent;
|
|
215
|
-
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['floatingToolbar', 'editorDisabled', 'editorViewMode', '
|
|
223
|
+
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['floatingToolbar', 'editorDisabled', 'editorViewMode', 'userIntent',
|
|
224
|
+
// @ts-expect-error - excluded from FloatingToolbarPlugin dependencies to avoid circular dependency
|
|
225
|
+
'blockControls']),
|
|
216
226
|
floatingToolbarState = _useSharedPluginState.floatingToolbarState,
|
|
217
227
|
editorDisabledState = _useSharedPluginState.editorDisabledState,
|
|
218
228
|
editorViewModeState = _useSharedPluginState.editorViewModeState,
|
|
229
|
+
userIntentState = _useSharedPluginState.userIntentState,
|
|
219
230
|
blockControlsState = _useSharedPluginState.blockControlsState;
|
|
220
231
|
var _ref6 = floatingToolbarState !== null && floatingToolbarState !== void 0 ? floatingToolbarState : {},
|
|
221
232
|
configWithNodeInfo = _ref6.configWithNodeInfo,
|
|
@@ -223,11 +234,22 @@ function ContentComponent(_ref5) {
|
|
|
223
234
|
if (!configWithNodeInfo || !configWithNodeInfo.config || typeof ((_configWithNodeInfo$c = configWithNodeInfo.config) === null || _configWithNodeInfo$c === void 0 ? void 0 : _configWithNodeInfo$c.visible) !== 'undefined' && !((_configWithNodeInfo$c2 = configWithNodeInfo.config) !== null && _configWithNodeInfo$c2 !== void 0 && _configWithNodeInfo$c2.visible)) {
|
|
224
235
|
return null;
|
|
225
236
|
}
|
|
226
|
-
if (
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
237
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_user_intent_plugin')) {
|
|
238
|
+
if ((userIntentState === null || userIntentState === void 0 ? void 0 : userIntentState.currentUserIntent) === 'dragging') {
|
|
239
|
+
return null;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// TODO: ED-27539 - This feature is unreleased and rendering logic needs to be move userIntentState which is not ready yet
|
|
243
|
+
// if (blockControlsState?.isMenuOpen && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
244
|
+
// return null;
|
|
245
|
+
// }
|
|
246
|
+
} else {
|
|
247
|
+
if (blockControlsState !== null && blockControlsState !== void 0 && blockControlsState.isDragging) {
|
|
248
|
+
return null;
|
|
249
|
+
}
|
|
250
|
+
if (blockControlsState !== null && blockControlsState !== void 0 && blockControlsState.isMenuOpen && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
|
|
251
|
+
return null;
|
|
252
|
+
}
|
|
231
253
|
}
|
|
232
254
|
var config = configWithNodeInfo.config,
|
|
233
255
|
node = configWithNodeInfo.node;
|
package/dist/cjs/ui/Toolbar.js
CHANGED
|
@@ -166,7 +166,8 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
166
166
|
tabIndex: item.tabIndex,
|
|
167
167
|
isRadioButton: item.isRadioButton,
|
|
168
168
|
pulse: item.pulse,
|
|
169
|
-
spotlightConfig: item.spotlightConfig
|
|
169
|
+
spotlightConfig: item.spotlightConfig,
|
|
170
|
+
interactionName: item.interactionName
|
|
170
171
|
}, item.showTitle && item.title);
|
|
171
172
|
case 'input':
|
|
172
173
|
return (0, _react2.jsx)(_Input.Input, {
|
|
@@ -154,11 +154,19 @@ export const floatingToolbarPlugin = ({
|
|
|
154
154
|
copyNode: nodeType => copyNode(nodeType)
|
|
155
155
|
},
|
|
156
156
|
getSharedState(editorState) {
|
|
157
|
-
var
|
|
157
|
+
var _api$interaction, _api$interaction$shar;
|
|
158
158
|
if (!editorState) {
|
|
159
159
|
return undefined;
|
|
160
160
|
}
|
|
161
|
-
const
|
|
161
|
+
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;
|
|
162
|
+
let configWithNodeInfo;
|
|
163
|
+
if (fg('platform_editor_no_selection_until_interaction')) {
|
|
164
|
+
var _pluginKey$getState$g, _pluginKey$getState, _pluginKey$getState$g2;
|
|
165
|
+
configWithNodeInfo = hasHadInteraction !== false ? (_pluginKey$getState$g = (_pluginKey$getState = pluginKey.getState(editorState)) === null || _pluginKey$getState === void 0 ? void 0 : (_pluginKey$getState$g2 = _pluginKey$getState.getConfigWithNodeInfo) === null || _pluginKey$getState$g2 === void 0 ? void 0 : _pluginKey$getState$g2.call(_pluginKey$getState, editorState)) !== null && _pluginKey$getState$g !== void 0 ? _pluginKey$getState$g : undefined : undefined;
|
|
166
|
+
} else {
|
|
167
|
+
var _pluginKey$getState$g3, _pluginKey$getState2, _pluginKey$getState2$;
|
|
168
|
+
configWithNodeInfo = (_pluginKey$getState$g3 = (_pluginKey$getState2 = pluginKey.getState(editorState)) === null || _pluginKey$getState2 === void 0 ? void 0 : (_pluginKey$getState2$ = _pluginKey$getState2.getConfigWithNodeInfo) === null || _pluginKey$getState2$ === void 0 ? void 0 : _pluginKey$getState2$.call(_pluginKey$getState2, editorState)) !== null && _pluginKey$getState$g3 !== void 0 ? _pluginKey$getState$g3 : undefined;
|
|
169
|
+
}
|
|
162
170
|
return {
|
|
163
171
|
configWithNodeInfo,
|
|
164
172
|
floatingToolbarData: dataPluginKey.getState(editorState)
|
|
@@ -198,8 +206,12 @@ export function ContentComponent({
|
|
|
198
206
|
floatingToolbarState,
|
|
199
207
|
editorDisabledState,
|
|
200
208
|
editorViewModeState,
|
|
209
|
+
userIntentState,
|
|
210
|
+
// @ts-expect-error - excluded from FloatingToolbarPlugin dependencies to avoid circular dependency
|
|
201
211
|
blockControlsState
|
|
202
|
-
} = useSharedPluginState(pluginInjectionApi, ['floatingToolbar', 'editorDisabled', 'editorViewMode', '
|
|
212
|
+
} = useSharedPluginState(pluginInjectionApi, ['floatingToolbar', 'editorDisabled', 'editorViewMode', 'userIntent',
|
|
213
|
+
// @ts-expect-error - excluded from FloatingToolbarPlugin dependencies to avoid circular dependency
|
|
214
|
+
'blockControls']);
|
|
203
215
|
const {
|
|
204
216
|
configWithNodeInfo,
|
|
205
217
|
floatingToolbarData
|
|
@@ -207,11 +219,22 @@ export function ContentComponent({
|
|
|
207
219
|
if (!configWithNodeInfo || !configWithNodeInfo.config || typeof ((_configWithNodeInfo$c = configWithNodeInfo.config) === null || _configWithNodeInfo$c === void 0 ? void 0 : _configWithNodeInfo$c.visible) !== 'undefined' && !((_configWithNodeInfo$c2 = configWithNodeInfo.config) !== null && _configWithNodeInfo$c2 !== void 0 && _configWithNodeInfo$c2.visible)) {
|
|
208
220
|
return null;
|
|
209
221
|
}
|
|
210
|
-
if (
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
222
|
+
if (fg('platform_editor_user_intent_plugin')) {
|
|
223
|
+
if ((userIntentState === null || userIntentState === void 0 ? void 0 : userIntentState.currentUserIntent) === 'dragging') {
|
|
224
|
+
return null;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// TODO: ED-27539 - This feature is unreleased and rendering logic needs to be move userIntentState which is not ready yet
|
|
228
|
+
// if (blockControlsState?.isMenuOpen && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
229
|
+
// return null;
|
|
230
|
+
// }
|
|
231
|
+
} else {
|
|
232
|
+
if (blockControlsState !== null && blockControlsState !== void 0 && blockControlsState.isDragging) {
|
|
233
|
+
return null;
|
|
234
|
+
}
|
|
235
|
+
if (blockControlsState !== null && blockControlsState !== void 0 && blockControlsState.isMenuOpen && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
236
|
+
return null;
|
|
237
|
+
}
|
|
215
238
|
}
|
|
216
239
|
const {
|
|
217
240
|
config,
|
|
@@ -147,7 +147,8 @@ const ToolbarItems = /*#__PURE__*/React.memo(({
|
|
|
147
147
|
tabIndex: item.tabIndex,
|
|
148
148
|
isRadioButton: item.isRadioButton,
|
|
149
149
|
pulse: item.pulse,
|
|
150
|
-
spotlightConfig: item.spotlightConfig
|
|
150
|
+
spotlightConfig: item.spotlightConfig,
|
|
151
|
+
interactionName: item.interactionName
|
|
151
152
|
}, item.showTitle && item.title);
|
|
152
153
|
case 'input':
|
|
153
154
|
return jsx(Input, {
|
|
@@ -162,11 +162,19 @@ export var floatingToolbarPlugin = function floatingToolbarPlugin(_ref) {
|
|
|
162
162
|
}
|
|
163
163
|
},
|
|
164
164
|
getSharedState: function getSharedState(editorState) {
|
|
165
|
-
var
|
|
165
|
+
var _api$interaction;
|
|
166
166
|
if (!editorState) {
|
|
167
167
|
return undefined;
|
|
168
168
|
}
|
|
169
|
-
var
|
|
169
|
+
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;
|
|
170
|
+
var configWithNodeInfo;
|
|
171
|
+
if (fg('platform_editor_no_selection_until_interaction')) {
|
|
172
|
+
var _pluginKey$getState$g, _pluginKey$getState, _pluginKey$getState$g2;
|
|
173
|
+
configWithNodeInfo = hasHadInteraction !== false ? (_pluginKey$getState$g = (_pluginKey$getState = pluginKey.getState(editorState)) === null || _pluginKey$getState === void 0 || (_pluginKey$getState$g2 = _pluginKey$getState.getConfigWithNodeInfo) === null || _pluginKey$getState$g2 === void 0 ? void 0 : _pluginKey$getState$g2.call(_pluginKey$getState, editorState)) !== null && _pluginKey$getState$g !== void 0 ? _pluginKey$getState$g : undefined : undefined;
|
|
174
|
+
} else {
|
|
175
|
+
var _pluginKey$getState$g3, _pluginKey$getState2, _pluginKey$getState2$;
|
|
176
|
+
configWithNodeInfo = (_pluginKey$getState$g3 = (_pluginKey$getState2 = pluginKey.getState(editorState)) === null || _pluginKey$getState2 === void 0 || (_pluginKey$getState2$ = _pluginKey$getState2.getConfigWithNodeInfo) === null || _pluginKey$getState2$ === void 0 ? void 0 : _pluginKey$getState2$.call(_pluginKey$getState2, editorState)) !== null && _pluginKey$getState$g3 !== void 0 ? _pluginKey$getState$g3 : undefined;
|
|
177
|
+
}
|
|
170
178
|
return {
|
|
171
179
|
configWithNodeInfo: configWithNodeInfo,
|
|
172
180
|
floatingToolbarData: dataPluginKey.getState(editorState)
|
|
@@ -200,10 +208,13 @@ export function ContentComponent(_ref5) {
|
|
|
200
208
|
popupsScrollableElement = _ref5.popupsScrollableElement,
|
|
201
209
|
providerFactory = _ref5.providerFactory,
|
|
202
210
|
dispatchAnalyticsEvent = _ref5.dispatchAnalyticsEvent;
|
|
203
|
-
var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['floatingToolbar', 'editorDisabled', 'editorViewMode', '
|
|
211
|
+
var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['floatingToolbar', 'editorDisabled', 'editorViewMode', 'userIntent',
|
|
212
|
+
// @ts-expect-error - excluded from FloatingToolbarPlugin dependencies to avoid circular dependency
|
|
213
|
+
'blockControls']),
|
|
204
214
|
floatingToolbarState = _useSharedPluginState.floatingToolbarState,
|
|
205
215
|
editorDisabledState = _useSharedPluginState.editorDisabledState,
|
|
206
216
|
editorViewModeState = _useSharedPluginState.editorViewModeState,
|
|
217
|
+
userIntentState = _useSharedPluginState.userIntentState,
|
|
207
218
|
blockControlsState = _useSharedPluginState.blockControlsState;
|
|
208
219
|
var _ref6 = floatingToolbarState !== null && floatingToolbarState !== void 0 ? floatingToolbarState : {},
|
|
209
220
|
configWithNodeInfo = _ref6.configWithNodeInfo,
|
|
@@ -211,11 +222,22 @@ export function ContentComponent(_ref5) {
|
|
|
211
222
|
if (!configWithNodeInfo || !configWithNodeInfo.config || typeof ((_configWithNodeInfo$c = configWithNodeInfo.config) === null || _configWithNodeInfo$c === void 0 ? void 0 : _configWithNodeInfo$c.visible) !== 'undefined' && !((_configWithNodeInfo$c2 = configWithNodeInfo.config) !== null && _configWithNodeInfo$c2 !== void 0 && _configWithNodeInfo$c2.visible)) {
|
|
212
223
|
return null;
|
|
213
224
|
}
|
|
214
|
-
if (
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
225
|
+
if (fg('platform_editor_user_intent_plugin')) {
|
|
226
|
+
if ((userIntentState === null || userIntentState === void 0 ? void 0 : userIntentState.currentUserIntent) === 'dragging') {
|
|
227
|
+
return null;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// TODO: ED-27539 - This feature is unreleased and rendering logic needs to be move userIntentState which is not ready yet
|
|
231
|
+
// if (blockControlsState?.isMenuOpen && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
232
|
+
// return null;
|
|
233
|
+
// }
|
|
234
|
+
} else {
|
|
235
|
+
if (blockControlsState !== null && blockControlsState !== void 0 && blockControlsState.isDragging) {
|
|
236
|
+
return null;
|
|
237
|
+
}
|
|
238
|
+
if (blockControlsState !== null && blockControlsState !== void 0 && blockControlsState.isMenuOpen && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
239
|
+
return null;
|
|
240
|
+
}
|
|
219
241
|
}
|
|
220
242
|
var config = configWithNodeInfo.config,
|
|
221
243
|
node = configWithNodeInfo.node;
|
package/dist/esm/ui/Toolbar.js
CHANGED
|
@@ -159,7 +159,8 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
159
159
|
tabIndex: item.tabIndex,
|
|
160
160
|
isRadioButton: item.isRadioButton,
|
|
161
161
|
pulse: item.pulse,
|
|
162
|
-
spotlightConfig: item.spotlightConfig
|
|
162
|
+
spotlightConfig: item.spotlightConfig,
|
|
163
|
+
interactionName: item.interactionName
|
|
163
164
|
}, item.showTitle && item.title);
|
|
164
165
|
case 'input':
|
|
165
166
|
return jsx(Input, {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { FloatingToolbarConfig, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { BlockControlsPlugin } from '@atlaskit/editor-plugin-block-controls';
|
|
3
2
|
import type { ContextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
|
|
4
3
|
import type { CopyButtonPlugin } from '@atlaskit/editor-plugin-copy-button';
|
|
5
4
|
import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
@@ -8,6 +7,8 @@ import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmo
|
|
|
8
7
|
import type { EmojiPlugin } from '@atlaskit/editor-plugin-emoji';
|
|
9
8
|
import type { ExtensionPlugin } from '@atlaskit/editor-plugin-extension';
|
|
10
9
|
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
10
|
+
import type { InteractionPlugin } from '@atlaskit/editor-plugin-interaction';
|
|
11
|
+
import type { UserIntentPlugin } from '@atlaskit/editor-plugin-user-intent';
|
|
11
12
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
12
13
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
13
14
|
export type ConfigWithNodeInfo = {
|
|
@@ -33,9 +34,10 @@ export type FloatingToolbarPluginDependencies = [
|
|
|
33
34
|
CopyButtonPlugin,
|
|
34
35
|
EditorDisabledPlugin,
|
|
35
36
|
OptionalPlugin<EditorViewModePlugin>,
|
|
36
|
-
OptionalPlugin<BlockControlsPlugin>,
|
|
37
37
|
OptionalPlugin<FeatureFlagsPlugin>,
|
|
38
|
-
OptionalPlugin<EmojiPlugin
|
|
38
|
+
OptionalPlugin<EmojiPlugin>,
|
|
39
|
+
OptionalPlugin<UserIntentPlugin>,
|
|
40
|
+
OptionalPlugin<InteractionPlugin>
|
|
39
41
|
];
|
|
40
42
|
export type FloatingToolbarPlugin = NextEditorPlugin<'floatingToolbar', {
|
|
41
43
|
dependencies: FloatingToolbarPluginDependencies;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { FloatingToolbarConfig, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { BlockControlsPlugin } from '@atlaskit/editor-plugin-block-controls';
|
|
3
2
|
import type { ContextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
|
|
4
3
|
import type { CopyButtonPlugin } from '@atlaskit/editor-plugin-copy-button';
|
|
5
4
|
import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
@@ -8,6 +7,8 @@ import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmo
|
|
|
8
7
|
import type { EmojiPlugin } from '@atlaskit/editor-plugin-emoji';
|
|
9
8
|
import type { ExtensionPlugin } from '@atlaskit/editor-plugin-extension';
|
|
10
9
|
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
10
|
+
import type { InteractionPlugin } from '@atlaskit/editor-plugin-interaction';
|
|
11
|
+
import type { UserIntentPlugin } from '@atlaskit/editor-plugin-user-intent';
|
|
11
12
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
12
13
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
13
14
|
export type ConfigWithNodeInfo = {
|
|
@@ -33,9 +34,10 @@ export type FloatingToolbarPluginDependencies = [
|
|
|
33
34
|
CopyButtonPlugin,
|
|
34
35
|
EditorDisabledPlugin,
|
|
35
36
|
OptionalPlugin<EditorViewModePlugin>,
|
|
36
|
-
OptionalPlugin<BlockControlsPlugin>,
|
|
37
37
|
OptionalPlugin<FeatureFlagsPlugin>,
|
|
38
|
-
OptionalPlugin<EmojiPlugin
|
|
38
|
+
OptionalPlugin<EmojiPlugin>,
|
|
39
|
+
OptionalPlugin<UserIntentPlugin>,
|
|
40
|
+
OptionalPlugin<InteractionPlugin>
|
|
39
41
|
];
|
|
40
42
|
export type FloatingToolbarPlugin = NextEditorPlugin<'floatingToolbar', {
|
|
41
43
|
dependencies: FloatingToolbarPluginDependencies;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-floating-toolbar",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"description": "Floating toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,28 +28,29 @@
|
|
|
28
28
|
"@atlaskit/adf-utils": "^19.19.0",
|
|
29
29
|
"@atlaskit/button": "^23.0.0",
|
|
30
30
|
"@atlaskit/checkbox": "^17.0.0",
|
|
31
|
-
"@atlaskit/editor-common": "^103.
|
|
31
|
+
"@atlaskit/editor-common": "^103.11.0",
|
|
32
32
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
33
|
-
"@atlaskit/editor-plugin-block-controls": "^3.8.0",
|
|
34
33
|
"@atlaskit/editor-plugin-context-panel": "^4.0.0",
|
|
35
34
|
"@atlaskit/editor-plugin-copy-button": "^2.0.0",
|
|
36
35
|
"@atlaskit/editor-plugin-decorations": "^2.0.0",
|
|
37
36
|
"@atlaskit/editor-plugin-editor-disabled": "^2.0.0",
|
|
38
37
|
"@atlaskit/editor-plugin-editor-viewmode": "^3.1.0",
|
|
39
|
-
"@atlaskit/editor-plugin-emoji": "^3.
|
|
38
|
+
"@atlaskit/editor-plugin-emoji": "^3.6.0",
|
|
40
39
|
"@atlaskit/editor-plugin-extension": "^5.2.0",
|
|
41
|
-
"@atlaskit/editor-plugin-
|
|
40
|
+
"@atlaskit/editor-plugin-interaction": "^1.0.0",
|
|
41
|
+
"@atlaskit/editor-plugin-table": "^10.8.0",
|
|
42
|
+
"@atlaskit/editor-plugin-user-intent": "^0.1.0",
|
|
42
43
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
43
44
|
"@atlaskit/emoji": "^69.0.0",
|
|
44
|
-
"@atlaskit/icon": "^25.
|
|
45
|
+
"@atlaskit/icon": "^25.6.0",
|
|
45
46
|
"@atlaskit/menu": "^3.2.0",
|
|
46
47
|
"@atlaskit/modal-dialog": "^14.1.0",
|
|
47
48
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
48
49
|
"@atlaskit/primitives": "^14.4.0",
|
|
49
50
|
"@atlaskit/select": "^20.3.0",
|
|
50
51
|
"@atlaskit/theme": "^18.0.0",
|
|
51
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
52
|
-
"@atlaskit/tokens": "^4.
|
|
52
|
+
"@atlaskit/tmp-editor-statsig": "^4.12.0",
|
|
53
|
+
"@atlaskit/tokens": "^4.8.0",
|
|
53
54
|
"@atlaskit/tooltip": "^20.0.0",
|
|
54
55
|
"@babel/runtime": "^7.0.0",
|
|
55
56
|
"@emotion/react": "^11.7.1",
|
|
@@ -137,6 +138,12 @@
|
|
|
137
138
|
},
|
|
138
139
|
"platform_editor_controls_patch_4": {
|
|
139
140
|
"type": "boolean"
|
|
141
|
+
},
|
|
142
|
+
"platform_editor_no_selection_until_interaction": {
|
|
143
|
+
"type": "boolean"
|
|
144
|
+
},
|
|
145
|
+
"platform_editor_user_intent_plugin": {
|
|
146
|
+
"type": "boolean"
|
|
140
147
|
}
|
|
141
148
|
}
|
|
142
149
|
}
|