@atlaskit/editor-plugin-expand 2.10.11 → 2.10.13
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 +14 -0
- package/dist/cjs/legacyExpand/nodeviews/index.js +15 -1
- package/dist/cjs/legacyExpand/plugin.js +2 -0
- package/dist/cjs/legacyExpand/pm-plugins/keymap.js +24 -6
- package/dist/cjs/legacyExpand/pm-plugins/main.js +6 -5
- package/dist/cjs/legacyExpand/ui/ExpandIconButton.js +12 -2
- package/dist/cjs/plugin.js +2 -0
- package/dist/cjs/singlePlayerExpand/commands.js +4 -0
- package/dist/cjs/singlePlayerExpand/node-views/index.js +11 -0
- package/dist/cjs/singlePlayerExpand/plugin.js +2 -0
- package/dist/cjs/singlePlayerExpand/pm-plugins/keymap.js +24 -6
- package/dist/cjs/singlePlayerExpand/pm-plugins/main.js +6 -5
- package/dist/cjs/singlePlayerExpand/toolbar.js +5 -1
- package/dist/cjs/singlePlayerExpand/ui/ExpandButton.js +14 -2
- package/dist/cjs/singlePlayerExpand/ui/NodeView.js +4 -1
- package/dist/es2019/legacyExpand/nodeviews/index.js +16 -2
- package/dist/es2019/legacyExpand/plugin.js +3 -0
- package/dist/es2019/legacyExpand/pm-plugins/keymap.js +24 -6
- package/dist/es2019/legacyExpand/pm-plugins/main.js +10 -7
- package/dist/es2019/legacyExpand/ui/ExpandIconButton.js +12 -2
- package/dist/es2019/plugin.js +2 -0
- package/dist/es2019/singlePlayerExpand/commands.js +4 -0
- package/dist/es2019/singlePlayerExpand/node-views/index.js +11 -0
- package/dist/es2019/singlePlayerExpand/plugin.js +3 -0
- package/dist/es2019/singlePlayerExpand/pm-plugins/keymap.js +24 -6
- package/dist/es2019/singlePlayerExpand/pm-plugins/main.js +10 -7
- package/dist/es2019/singlePlayerExpand/toolbar.js +4 -1
- package/dist/es2019/singlePlayerExpand/ui/ExpandButton.js +14 -2
- package/dist/es2019/singlePlayerExpand/ui/NodeView.js +4 -1
- package/dist/esm/legacyExpand/nodeviews/index.js +15 -1
- package/dist/esm/legacyExpand/plugin.js +3 -0
- package/dist/esm/legacyExpand/pm-plugins/keymap.js +24 -6
- package/dist/esm/legacyExpand/pm-plugins/main.js +5 -5
- package/dist/esm/legacyExpand/ui/ExpandIconButton.js +12 -2
- package/dist/esm/plugin.js +2 -0
- package/dist/esm/singlePlayerExpand/commands.js +4 -0
- package/dist/esm/singlePlayerExpand/node-views/index.js +11 -0
- package/dist/esm/singlePlayerExpand/plugin.js +3 -0
- package/dist/esm/singlePlayerExpand/pm-plugins/keymap.js +24 -6
- package/dist/esm/singlePlayerExpand/pm-plugins/main.js +5 -5
- package/dist/esm/singlePlayerExpand/toolbar.js +5 -1
- package/dist/esm/singlePlayerExpand/ui/ExpandButton.js +14 -2
- package/dist/esm/singlePlayerExpand/ui/NodeView.js +4 -1
- package/package.json +6 -9
|
@@ -3,8 +3,9 @@ import { createSelectionClickHandler } from '@atlaskit/editor-common/selection';
|
|
|
3
3
|
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
4
4
|
import { transformSliceExpandToNestedExpand, transformSliceNestedExpandToExpand } from '@atlaskit/editor-common/transforms';
|
|
5
5
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
7
|
+
// Ignored via go/ees005
|
|
8
|
+
// eslint-disable-next-line import/no-named-as-default
|
|
8
9
|
import ExpandNodeView from '../node-views';
|
|
9
10
|
export var pluginKey = new PluginKey('expandPlugin');
|
|
10
11
|
export function containsClass(element, className) {
|
|
@@ -54,11 +55,10 @@ export var createPlugin = function createPlugin(dispatch, getIntl) {
|
|
|
54
55
|
}, {
|
|
55
56
|
useLongPressSelection: useLongPressSelection
|
|
56
57
|
}),
|
|
58
|
+
// Ignored via go/ees005
|
|
59
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
57
60
|
handleDrop: function handleDrop(view, event, slice, moved) {
|
|
58
|
-
|
|
59
|
-
return handleExpandDrag(view, event, slice);
|
|
60
|
-
}
|
|
61
|
-
return false;
|
|
61
|
+
return handleExpandDrag(view, event, slice);
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
// @see ED-8027 to follow up on this work-around
|
|
@@ -20,7 +20,11 @@ export var getToolbarConfig = function getToolbarConfig(api) {
|
|
|
20
20
|
return {
|
|
21
21
|
title: 'Expand toolbar',
|
|
22
22
|
getDomRef: function getDomRef(view) {
|
|
23
|
-
return
|
|
23
|
+
return (
|
|
24
|
+
// Ignored via go/ees005
|
|
25
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
26
|
+
findDomRefAtPos(selectedExpandNode.pos, view.domAtPos.bind(view))
|
|
27
|
+
);
|
|
24
28
|
},
|
|
25
29
|
nodeType: [nestedExpand, expand],
|
|
26
30
|
offset: [0, 6],
|
|
@@ -25,11 +25,19 @@ function withTooltip(Component) {
|
|
|
25
25
|
content: props.label,
|
|
26
26
|
position: "top",
|
|
27
27
|
tag: ExpandLayoutWrapperWithRef
|
|
28
|
-
}, jsx(Component
|
|
28
|
+
}, jsx(Component
|
|
29
|
+
// Ignored via go/ees005
|
|
30
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
31
|
+
, props));
|
|
29
32
|
};
|
|
30
33
|
}
|
|
31
34
|
export var ExpandButtonInner = function ExpandButtonInner(props) {
|
|
32
|
-
var useTheme = useCallback(
|
|
35
|
+
var useTheme = useCallback(
|
|
36
|
+
// Ignored via go/ees005
|
|
37
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
38
|
+
// Ignored via go/ees005
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
40
|
+
function (currentTheme, themeProps) {
|
|
33
41
|
var _currentTheme = currentTheme(themeProps),
|
|
34
42
|
buttonStyles = _currentTheme.buttonStyles,
|
|
35
43
|
rest = _objectWithoutProperties(_currentTheme, _excluded);
|
|
@@ -71,6 +79,8 @@ export var ExpandButton = function ExpandButton(props) {
|
|
|
71
79
|
|
|
72
80
|
// hoverEventCheck is to disable tooltips for mobile to prevent incorrect hover state causing issues on iOS
|
|
73
81
|
if (props.allowInteractiveExpand && hoverEventCheck) {
|
|
82
|
+
// Ignored via go/ees005
|
|
83
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
74
84
|
return jsx(ButtonWithTooltip, _extends({
|
|
75
85
|
label: label
|
|
76
86
|
}, props));
|
|
@@ -81,6 +91,8 @@ export var ExpandButton = function ExpandButton(props) {
|
|
|
81
91
|
css: expandLayoutWrapperStyle
|
|
82
92
|
}, jsx(ButtonWithoutTooltip, _extends({
|
|
83
93
|
label: label
|
|
94
|
+
// Ignored via go/ees005
|
|
95
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
84
96
|
}, props)))
|
|
85
97
|
);
|
|
86
98
|
};
|
|
@@ -4,7 +4,10 @@ import { expandMessages } from '@atlaskit/editor-common/ui';
|
|
|
4
4
|
export var buildExpandClassName = function buildExpandClassName(type, expanded) {
|
|
5
5
|
return "".concat(expandClassNames.prefix, " ").concat(expandClassNames.type(type), " ").concat(expanded ? expandClassNames.expanded : '');
|
|
6
6
|
};
|
|
7
|
-
export var toDOM = function toDOM(node, __livePage, intl, titleReadOnly, contentEditable
|
|
7
|
+
export var toDOM = function toDOM(node, __livePage, intl, titleReadOnly, contentEditable
|
|
8
|
+
// Ignored via go/ees005
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
10
|
+
) {
|
|
8
11
|
var _expandedState$get;
|
|
9
12
|
return ['div', {
|
|
10
13
|
// prettier-ignore
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-expand",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.13",
|
|
4
4
|
"description": "Expand plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "^46.1.0",
|
|
35
35
|
"@atlaskit/button": "^20.3.0",
|
|
36
|
-
"@atlaskit/editor-common": "^
|
|
36
|
+
"@atlaskit/editor-common": "^98.2.0",
|
|
37
37
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
38
38
|
"@atlaskit/editor-plugin-decorations": "^1.3.0",
|
|
39
39
|
"@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
43
43
|
"@atlaskit/editor-shared-styles": "^3.2.0",
|
|
44
44
|
"@atlaskit/editor-tables": "^2.8.0",
|
|
45
|
-
"@atlaskit/icon": "^23.
|
|
45
|
+
"@atlaskit/icon": "^23.2.0",
|
|
46
46
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
47
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
47
|
+
"@atlaskit/tmp-editor-statsig": "^2.32.0",
|
|
48
48
|
"@atlaskit/tokens": "^2.5.0",
|
|
49
49
|
"@atlaskit/tooltip": "^19.0.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
"@atlaskit/editor-plugin-content-insertion": "^1.11.0",
|
|
63
63
|
"@atlaskit/editor-plugin-guideline": "^1.2.0",
|
|
64
64
|
"@atlaskit/editor-plugin-quick-insert": "^1.8.0",
|
|
65
|
-
"@atlaskit/editor-plugin-table": "^
|
|
65
|
+
"@atlaskit/editor-plugin-table": "^9.0.0",
|
|
66
66
|
"@atlaskit/editor-plugin-type-ahead": "^1.11.0",
|
|
67
|
-
"@atlaskit/editor-plugin-width": "^
|
|
67
|
+
"@atlaskit/editor-plugin-width": "^2.0.0",
|
|
68
68
|
"@testing-library/react": "^12.1.5",
|
|
69
69
|
"react-test-renderer": "^16.8.0",
|
|
70
70
|
"typescript": "~5.4.2"
|
|
@@ -115,9 +115,6 @@
|
|
|
115
115
|
"platform_editor_nested_expand_in_expand_adf_change": {
|
|
116
116
|
"type": "boolean"
|
|
117
117
|
},
|
|
118
|
-
"platform_editor_nest_nested_expand_drag_fix": {
|
|
119
|
-
"type": "boolean"
|
|
120
|
-
},
|
|
121
118
|
"platform_editor_remove_copy_button_from_view_mode": {
|
|
122
119
|
"type": "boolean"
|
|
123
120
|
},
|