@atlaskit/editor-plugin-toolbar 3.4.7 → 3.4.9
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 +16 -0
- package/afm-jira/tsconfig.json +1 -1
- package/dist/cjs/pm-plugins/experiences/selection-toolbar-open-experience.js +5 -15
- package/dist/cjs/toolbarPlugin.js +3 -0
- package/dist/es2019/pm-plugins/experiences/selection-toolbar-open-experience.js +5 -15
- package/dist/es2019/toolbarPlugin.js +3 -0
- package/dist/esm/pm-plugins/experiences/selection-toolbar-open-experience.js +5 -15
- package/dist/esm/toolbarPlugin.js +3 -0
- package/dist/types/toolbarPluginType.d.ts +10 -0
- package/dist/types-ts4.5/toolbarPluginType.d.ts +10 -0
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-toolbar
|
|
2
2
|
|
|
3
|
+
## 3.4.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`fd59b4b1d712d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fd59b4b1d712d) -
|
|
8
|
+
[ux] ED-29573 Improve JSM comment responsiveness
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 3.4.8
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`76e788fce7750`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/76e788fce7750) -
|
|
16
|
+
ED-29665 experience tracking updates
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 3.4.7
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/afm-jira/tsconfig.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"extends": "../../../../tsconfig.entry-points.jira.json",
|
|
3
3
|
"compilerOptions": {
|
|
4
4
|
"target": "es5",
|
|
5
|
-
"outDir": "../../../../../tsDist/@atlaskit__editor-plugin-toolbar/app",
|
|
5
|
+
"outDir": "../../../../../jira/tsDist/@atlaskit__editor-plugin-toolbar/app",
|
|
6
6
|
"rootDir": "../",
|
|
7
7
|
"composite": true
|
|
8
8
|
},
|
|
@@ -46,9 +46,7 @@ var getSelectionToolbarOpenExperiencePlugin = exports.getSelectionToolbarOpenExp
|
|
|
46
46
|
if (isBlockMenuWithinNode(getTarget())) {
|
|
47
47
|
return {
|
|
48
48
|
status: 'abort',
|
|
49
|
-
|
|
50
|
-
reason: ABORT_REASON.BLOCK_MENU_OPENED
|
|
51
|
-
}
|
|
49
|
+
reason: ABORT_REASON.BLOCK_MENU_OPENED
|
|
52
50
|
};
|
|
53
51
|
}
|
|
54
52
|
}
|
|
@@ -80,9 +78,7 @@ var getSelectionToolbarOpenExperiencePlugin = exports.getSelectionToolbarOpenExp
|
|
|
80
78
|
apply: function apply(_tr, pluginState, oldState, newState) {
|
|
81
79
|
if (!oldState.selection.empty && newState.selection.empty) {
|
|
82
80
|
experience.abort({
|
|
83
|
-
|
|
84
|
-
reason: ABORT_REASON.SELECTION_CLEARED
|
|
85
|
-
}
|
|
81
|
+
reason: ABORT_REASON.SELECTION_CLEARED
|
|
86
82
|
});
|
|
87
83
|
}
|
|
88
84
|
return pluginState;
|
|
@@ -93,9 +89,7 @@ var getSelectionToolbarOpenExperiencePlugin = exports.getSelectionToolbarOpenExp
|
|
|
93
89
|
mouseup: function mouseup(view) {
|
|
94
90
|
if (!view.state.selection.empty && !isSelectionToolbarWithinNode(getTarget())) {
|
|
95
91
|
experience.start({
|
|
96
|
-
|
|
97
|
-
method: START_METHOD.MOUSE_UP
|
|
98
|
-
}
|
|
92
|
+
method: START_METHOD.MOUSE_UP
|
|
99
93
|
});
|
|
100
94
|
}
|
|
101
95
|
},
|
|
@@ -104,9 +98,7 @@ var getSelectionToolbarOpenExperiencePlugin = exports.getSelectionToolbarOpenExp
|
|
|
104
98
|
key = _ref3.key;
|
|
105
99
|
if (shiftKey && key.includes('Arrow') && !isSelectionToolbarWithinNode(getTarget())) {
|
|
106
100
|
experience.start({
|
|
107
|
-
|
|
108
|
-
method: START_METHOD.KEY_DOWN
|
|
109
|
-
}
|
|
101
|
+
method: START_METHOD.KEY_DOWN
|
|
110
102
|
});
|
|
111
103
|
}
|
|
112
104
|
}
|
|
@@ -117,9 +109,7 @@ var getSelectionToolbarOpenExperiencePlugin = exports.getSelectionToolbarOpenExp
|
|
|
117
109
|
return {
|
|
118
110
|
destroy: function destroy() {
|
|
119
111
|
experience.abort({
|
|
120
|
-
|
|
121
|
-
reason: ABORT_REASON.EDITOR_DESTROYED
|
|
122
|
-
}
|
|
112
|
+
reason: ABORT_REASON.EDITOR_DESTROYED
|
|
123
113
|
});
|
|
124
114
|
}
|
|
125
115
|
};
|
|
@@ -99,6 +99,9 @@ var toolbarPlugin = exports.toolbarPlugin = function toolbarPlugin(_ref) {
|
|
|
99
99
|
},
|
|
100
100
|
contextualFormattingMode: function contextualFormattingMode() {
|
|
101
101
|
return contextualFormattingEnabled;
|
|
102
|
+
},
|
|
103
|
+
getBreakpointPreset: function getBreakpointPreset() {
|
|
104
|
+
return (0, _platformFeatureFlags.fg)('platform_editor_toolbar_aifc_responsive_improve') ? breakpointPreset : undefined;
|
|
102
105
|
}
|
|
103
106
|
},
|
|
104
107
|
getSharedState: function getSharedState(editorState) {
|
|
@@ -39,9 +39,7 @@ export const getSelectionToolbarOpenExperiencePlugin = ({
|
|
|
39
39
|
if (isBlockMenuWithinNode(getTarget())) {
|
|
40
40
|
return {
|
|
41
41
|
status: 'abort',
|
|
42
|
-
|
|
43
|
-
reason: ABORT_REASON.BLOCK_MENU_OPENED
|
|
44
|
-
}
|
|
42
|
+
reason: ABORT_REASON.BLOCK_MENU_OPENED
|
|
45
43
|
};
|
|
46
44
|
}
|
|
47
45
|
}
|
|
@@ -70,9 +68,7 @@ export const getSelectionToolbarOpenExperiencePlugin = ({
|
|
|
70
68
|
apply: (_tr, pluginState, oldState, newState) => {
|
|
71
69
|
if (!oldState.selection.empty && newState.selection.empty) {
|
|
72
70
|
experience.abort({
|
|
73
|
-
|
|
74
|
-
reason: ABORT_REASON.SELECTION_CLEARED
|
|
75
|
-
}
|
|
71
|
+
reason: ABORT_REASON.SELECTION_CLEARED
|
|
76
72
|
});
|
|
77
73
|
}
|
|
78
74
|
return pluginState;
|
|
@@ -83,9 +79,7 @@ export const getSelectionToolbarOpenExperiencePlugin = ({
|
|
|
83
79
|
mouseup: view => {
|
|
84
80
|
if (!view.state.selection.empty && !isSelectionToolbarWithinNode(getTarget())) {
|
|
85
81
|
experience.start({
|
|
86
|
-
|
|
87
|
-
method: START_METHOD.MOUSE_UP
|
|
88
|
-
}
|
|
82
|
+
method: START_METHOD.MOUSE_UP
|
|
89
83
|
});
|
|
90
84
|
}
|
|
91
85
|
},
|
|
@@ -95,9 +89,7 @@ export const getSelectionToolbarOpenExperiencePlugin = ({
|
|
|
95
89
|
}) => {
|
|
96
90
|
if (shiftKey && key.includes('Arrow') && !isSelectionToolbarWithinNode(getTarget())) {
|
|
97
91
|
experience.start({
|
|
98
|
-
|
|
99
|
-
method: START_METHOD.KEY_DOWN
|
|
100
|
-
}
|
|
92
|
+
method: START_METHOD.KEY_DOWN
|
|
101
93
|
});
|
|
102
94
|
}
|
|
103
95
|
}
|
|
@@ -108,9 +100,7 @@ export const getSelectionToolbarOpenExperiencePlugin = ({
|
|
|
108
100
|
return {
|
|
109
101
|
destroy: () => {
|
|
110
102
|
experience.abort({
|
|
111
|
-
|
|
112
|
-
reason: ABORT_REASON.EDITOR_DESTROYED
|
|
113
|
-
}
|
|
103
|
+
reason: ABORT_REASON.EDITOR_DESTROYED
|
|
114
104
|
});
|
|
115
105
|
}
|
|
116
106
|
};
|
|
@@ -84,6 +84,9 @@ export const toolbarPlugin = ({
|
|
|
84
84
|
},
|
|
85
85
|
contextualFormattingMode: () => {
|
|
86
86
|
return contextualFormattingEnabled;
|
|
87
|
+
},
|
|
88
|
+
getBreakpointPreset: () => {
|
|
89
|
+
return fg('platform_editor_toolbar_aifc_responsive_improve') ? breakpointPreset : undefined;
|
|
87
90
|
}
|
|
88
91
|
},
|
|
89
92
|
getSharedState(editorState) {
|
|
@@ -39,9 +39,7 @@ export var getSelectionToolbarOpenExperiencePlugin = function getSelectionToolba
|
|
|
39
39
|
if (isBlockMenuWithinNode(getTarget())) {
|
|
40
40
|
return {
|
|
41
41
|
status: 'abort',
|
|
42
|
-
|
|
43
|
-
reason: ABORT_REASON.BLOCK_MENU_OPENED
|
|
44
|
-
}
|
|
42
|
+
reason: ABORT_REASON.BLOCK_MENU_OPENED
|
|
45
43
|
};
|
|
46
44
|
}
|
|
47
45
|
}
|
|
@@ -73,9 +71,7 @@ export var getSelectionToolbarOpenExperiencePlugin = function getSelectionToolba
|
|
|
73
71
|
apply: function apply(_tr, pluginState, oldState, newState) {
|
|
74
72
|
if (!oldState.selection.empty && newState.selection.empty) {
|
|
75
73
|
experience.abort({
|
|
76
|
-
|
|
77
|
-
reason: ABORT_REASON.SELECTION_CLEARED
|
|
78
|
-
}
|
|
74
|
+
reason: ABORT_REASON.SELECTION_CLEARED
|
|
79
75
|
});
|
|
80
76
|
}
|
|
81
77
|
return pluginState;
|
|
@@ -86,9 +82,7 @@ export var getSelectionToolbarOpenExperiencePlugin = function getSelectionToolba
|
|
|
86
82
|
mouseup: function mouseup(view) {
|
|
87
83
|
if (!view.state.selection.empty && !isSelectionToolbarWithinNode(getTarget())) {
|
|
88
84
|
experience.start({
|
|
89
|
-
|
|
90
|
-
method: START_METHOD.MOUSE_UP
|
|
91
|
-
}
|
|
85
|
+
method: START_METHOD.MOUSE_UP
|
|
92
86
|
});
|
|
93
87
|
}
|
|
94
88
|
},
|
|
@@ -97,9 +91,7 @@ export var getSelectionToolbarOpenExperiencePlugin = function getSelectionToolba
|
|
|
97
91
|
key = _ref3.key;
|
|
98
92
|
if (shiftKey && key.includes('Arrow') && !isSelectionToolbarWithinNode(getTarget())) {
|
|
99
93
|
experience.start({
|
|
100
|
-
|
|
101
|
-
method: START_METHOD.KEY_DOWN
|
|
102
|
-
}
|
|
94
|
+
method: START_METHOD.KEY_DOWN
|
|
103
95
|
});
|
|
104
96
|
}
|
|
105
97
|
}
|
|
@@ -110,9 +102,7 @@ export var getSelectionToolbarOpenExperiencePlugin = function getSelectionToolba
|
|
|
110
102
|
return {
|
|
111
103
|
destroy: function destroy() {
|
|
112
104
|
experience.abort({
|
|
113
|
-
|
|
114
|
-
reason: ABORT_REASON.EDITOR_DESTROYED
|
|
115
|
-
}
|
|
105
|
+
reason: ABORT_REASON.EDITOR_DESTROYED
|
|
116
106
|
});
|
|
117
107
|
}
|
|
118
108
|
};
|
|
@@ -92,6 +92,9 @@ export var toolbarPlugin = function toolbarPlugin(_ref) {
|
|
|
92
92
|
},
|
|
93
93
|
contextualFormattingMode: function contextualFormattingMode() {
|
|
94
94
|
return contextualFormattingEnabled;
|
|
95
|
+
},
|
|
96
|
+
getBreakpointPreset: function getBreakpointPreset() {
|
|
97
|
+
return fg('platform_editor_toolbar_aifc_responsive_improve') ? breakpointPreset : undefined;
|
|
95
98
|
}
|
|
96
99
|
},
|
|
97
100
|
getSharedState: function getSharedState(editorState) {
|
|
@@ -7,6 +7,7 @@ import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
|
7
7
|
import type { UserIntentPlugin } from '@atlaskit/editor-plugin-user-intent';
|
|
8
8
|
import type { UserPreferencesPlugin } from '@atlaskit/editor-plugin-user-preferences';
|
|
9
9
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
10
|
+
import type { BreakpointPreset } from '@atlaskit/editor-toolbar';
|
|
10
11
|
import type { RegisterComponent } from '@atlaskit/editor-toolbar-model';
|
|
11
12
|
import type { RegisterComponentsAction, ToolbarPluginOptions } from './types';
|
|
12
13
|
export type EditorToolbarPluginState = {
|
|
@@ -32,6 +33,15 @@ export type ToolbarPlugin = NextEditorPlugin<'toolbar', {
|
|
|
32
33
|
* - `controlled`: Both inline and primary toolbars are available
|
|
33
34
|
*/
|
|
34
35
|
contextualFormattingMode: () => ContextualFormattingEnabledOptions;
|
|
36
|
+
/**
|
|
37
|
+
* Returns the breakpoint preset configuration for the toolbar.
|
|
38
|
+
*
|
|
39
|
+
* This method retrieves the breakpoint preset that determines how the toolbar
|
|
40
|
+
* responds to different viewport sizes and layouts.
|
|
41
|
+
*
|
|
42
|
+
* @returns The configured breakpoint preset, or `undefined` if not set.
|
|
43
|
+
*/
|
|
44
|
+
getBreakpointPreset: () => BreakpointPreset | undefined;
|
|
35
45
|
getComponents: () => Array<RegisterComponent>;
|
|
36
46
|
registerComponents: RegisterComponentsAction;
|
|
37
47
|
};
|
|
@@ -7,6 +7,7 @@ import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
|
7
7
|
import type { UserIntentPlugin } from '@atlaskit/editor-plugin-user-intent';
|
|
8
8
|
import type { UserPreferencesPlugin } from '@atlaskit/editor-plugin-user-preferences';
|
|
9
9
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
10
|
+
import type { BreakpointPreset } from '@atlaskit/editor-toolbar';
|
|
10
11
|
import type { RegisterComponent } from '@atlaskit/editor-toolbar-model';
|
|
11
12
|
import type { RegisterComponentsAction, ToolbarPluginOptions } from './types';
|
|
12
13
|
export type EditorToolbarPluginState = {
|
|
@@ -32,6 +33,15 @@ export type ToolbarPlugin = NextEditorPlugin<'toolbar', {
|
|
|
32
33
|
* - `controlled`: Both inline and primary toolbars are available
|
|
33
34
|
*/
|
|
34
35
|
contextualFormattingMode: () => ContextualFormattingEnabledOptions;
|
|
36
|
+
/**
|
|
37
|
+
* Returns the breakpoint preset configuration for the toolbar.
|
|
38
|
+
*
|
|
39
|
+
* This method retrieves the breakpoint preset that determines how the toolbar
|
|
40
|
+
* responds to different viewport sizes and layouts.
|
|
41
|
+
*
|
|
42
|
+
* @returns The configured breakpoint preset, or `undefined` if not set.
|
|
43
|
+
*/
|
|
44
|
+
getBreakpointPreset: () => BreakpointPreset | undefined;
|
|
35
45
|
getComponents: () => Array<RegisterComponent>;
|
|
36
46
|
registerComponents: RegisterComponentsAction;
|
|
37
47
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-toolbar",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.9",
|
|
4
4
|
"description": "Toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"@atlaskit/editor-toolbar-model": "^0.2.0",
|
|
41
41
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
42
42
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
43
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
43
|
+
"@atlaskit/tmp-editor-statsig": "^13.38.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|
|
45
45
|
"bind-event-listener": "^3.0.0",
|
|
46
46
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@atlaskit/editor-common": "^110.
|
|
49
|
+
"@atlaskit/editor-common": "^110.32.0",
|
|
50
50
|
"react": "^18.2.0"
|
|
51
51
|
},
|
|
52
52
|
"platform-feature-flags": {
|
|
@@ -58,6 +58,9 @@
|
|
|
58
58
|
},
|
|
59
59
|
"platform_editor_toolbar_aifc_placement_config": {
|
|
60
60
|
"type": "boolean"
|
|
61
|
+
},
|
|
62
|
+
"platform_editor_toolbar_aifc_responsive_improve": {
|
|
63
|
+
"type": "boolean"
|
|
61
64
|
}
|
|
62
65
|
},
|
|
63
66
|
"techstack": {
|