@atlaskit/editor-plugin-selection-extension 11.0.0 → 11.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 +14 -0
- package/dist/cjs/ui/menu/SelectionExtensionDropdownItem.compiled.css +1 -0
- package/dist/cjs/ui/menu/SelectionExtensionDropdownItem.js +2 -1
- package/dist/cjs/ui/toolbar/SelectionExtensionDropdownMenu.js +2 -0
- package/dist/cjs/ui/toolbar/SelectionExtensionDropdownMenuButton.js +2 -0
- package/dist/cjs/ui/toolbar/SelectionExtensionItems.js +2 -0
- package/dist/es2019/ui/menu/SelectionExtensionDropdownItem.compiled.css +1 -0
- package/dist/es2019/ui/menu/SelectionExtensionDropdownItem.js +2 -1
- package/dist/es2019/ui/toolbar/SelectionExtensionDropdownMenu.js +2 -0
- package/dist/es2019/ui/toolbar/SelectionExtensionDropdownMenuButton.js +2 -0
- package/dist/es2019/ui/toolbar/SelectionExtensionItems.js +2 -0
- package/dist/esm/ui/menu/SelectionExtensionDropdownItem.compiled.css +1 -0
- package/dist/esm/ui/menu/SelectionExtensionDropdownItem.js +2 -1
- package/dist/esm/ui/toolbar/SelectionExtensionDropdownMenu.js +2 -0
- package/dist/esm/ui/toolbar/SelectionExtensionDropdownMenuButton.js +2 -0
- package/dist/esm/ui/toolbar/SelectionExtensionItems.js +2 -0
- package/dist/types/ui/SelectionExtensionComponentContext.d.ts +2 -1
- package/dist/types/ui/toolbar/SelectionExtensionDropdownMenu.d.ts +2 -2
- package/dist/types/ui/toolbar/SelectionExtensionDropdownMenuButton.d.ts +2 -2
- package/dist/types/ui/toolbar/SelectionExtensionItems.d.ts +2 -2
- package/dist/types/ui/toolbar-components/register-inline-toolbar.d.ts +1 -1
- package/dist/types-ts4.5/ui/SelectionExtensionComponentContext.d.ts +2 -1
- package/dist/types-ts4.5/ui/toolbar/SelectionExtensionDropdownMenu.d.ts +2 -2
- package/dist/types-ts4.5/ui/toolbar/SelectionExtensionDropdownMenuButton.d.ts +2 -2
- package/dist/types-ts4.5/ui/toolbar/SelectionExtensionItems.d.ts +2 -2
- package/dist/types-ts4.5/ui/toolbar-components/register-inline-toolbar.d.ts +1 -1
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-selection-extension
|
|
2
2
|
|
|
3
|
+
## 11.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a163b0b600d64`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a163b0b600d64) -
|
|
8
|
+
[ux] Justify space between for dropdown item to always space lozange on right
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 11.0.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 11.0.0
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -25,6 +25,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
25
25
|
var styles = {
|
|
26
26
|
svgOverflow: "_1wrmewfl _172sewfl",
|
|
27
27
|
contentWrapper: "_1e0c1txw _4cvr1h6o _1ul9idpf",
|
|
28
|
+
contentWrapperWithJustifyContent: "_1e0c1txw _4cvr1h6o _1bah1yb4 _1ul9idpf",
|
|
28
29
|
label: "_1reo15vq _18m915vq _1bto1l2s _o5721q9c _1ul9idpf",
|
|
29
30
|
lozenge: "_18u01b66 _1o9zidpf"
|
|
30
31
|
};
|
|
@@ -128,7 +129,7 @@ var SelectionExtensionDropdownItem = exports.SelectionExtensionDropdownItem = fu
|
|
|
128
129
|
testId: _blockMenu.EXTENSION_MENU_ITEM_TEST_ID
|
|
129
130
|
}, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
130
131
|
as: "span",
|
|
131
|
-
xcss: styles.contentWrapper,
|
|
132
|
+
xcss: (0, _platformFeatureFlags.fg)('platform_editor_block_menu_v2_patch_5') ? styles.contentWrapperWithJustifyContent : styles.contentWrapper,
|
|
132
133
|
onMouseOver: handleMouseEnter
|
|
133
134
|
}, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
134
135
|
as: "span",
|
|
@@ -53,4 +53,6 @@ var SelectionExtensionDropdownMenuComponent = /*#__PURE__*/_react.default.memo(f
|
|
|
53
53
|
}
|
|
54
54
|
}));
|
|
55
55
|
});
|
|
56
|
+
|
|
57
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
56
58
|
var SelectionExtensionDropdownMenu = exports.SelectionExtensionDropdownMenu = (0, _reactIntlNext.injectIntl)(SelectionExtensionDropdownMenuComponent);
|
|
@@ -35,4 +35,6 @@ var SelectionExtensionDropdownMenuButtonComponent = function SelectionExtensionD
|
|
|
35
35
|
spacing: "none"
|
|
36
36
|
}));
|
|
37
37
|
};
|
|
38
|
+
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
38
40
|
var SelectionExtensionDropdownMenuButton = exports.SelectionExtensionDropdownMenuButton = (0, _reactIntlNext.injectIntl)(SelectionExtensionDropdownMenuButtonComponent);
|
|
@@ -71,4 +71,6 @@ var SelectionExtensionItemsComponent = exports.SelectionExtensionItemsComponent
|
|
|
71
71
|
onItemActivated: handleOnItemActivated
|
|
72
72
|
});
|
|
73
73
|
};
|
|
74
|
+
|
|
75
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
74
76
|
var SelectionExtensionItems = exports.SelectionExtensionItems = (0, _reactIntlNext.injectIntl)(SelectionExtensionItemsComponent);
|
|
@@ -15,6 +15,7 @@ import { useSelectionExtensionComponentContext } from '../SelectionExtensionComp
|
|
|
15
15
|
const styles = {
|
|
16
16
|
svgOverflow: "_1wrmewfl _172sewfl",
|
|
17
17
|
contentWrapper: "_1e0c1txw _4cvr1h6o _1ul9idpf",
|
|
18
|
+
contentWrapperWithJustifyContent: "_1e0c1txw _4cvr1h6o _1bah1yb4 _1ul9idpf",
|
|
18
19
|
label: "_1reo15vq _18m915vq _1bto1l2s _o5721q9c _1ul9idpf",
|
|
19
20
|
lozenge: "_18u01b66 _1o9zidpf"
|
|
20
21
|
};
|
|
@@ -119,7 +120,7 @@ export const SelectionExtensionDropdownItem = ({
|
|
|
119
120
|
testId: EXTENSION_MENU_ITEM_TEST_ID
|
|
120
121
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
121
122
|
as: "span",
|
|
122
|
-
xcss: styles.contentWrapper,
|
|
123
|
+
xcss: fg('platform_editor_block_menu_v2_patch_5') ? styles.contentWrapperWithJustifyContent : styles.contentWrapper,
|
|
123
124
|
onMouseOver: handleMouseEnter
|
|
124
125
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
125
126
|
as: "span",
|
|
@@ -29,4 +29,6 @@ const SelectionExtensionDropdownMenuButtonComponent = ({
|
|
|
29
29
|
spacing: "none"
|
|
30
30
|
}));
|
|
31
31
|
};
|
|
32
|
+
|
|
33
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
32
34
|
export const SelectionExtensionDropdownMenuButton = injectIntl(SelectionExtensionDropdownMenuButtonComponent);
|
|
@@ -16,6 +16,7 @@ import { useSelectionExtensionComponentContext } from '../SelectionExtensionComp
|
|
|
16
16
|
var styles = {
|
|
17
17
|
svgOverflow: "_1wrmewfl _172sewfl",
|
|
18
18
|
contentWrapper: "_1e0c1txw _4cvr1h6o _1ul9idpf",
|
|
19
|
+
contentWrapperWithJustifyContent: "_1e0c1txw _4cvr1h6o _1bah1yb4 _1ul9idpf",
|
|
19
20
|
label: "_1reo15vq _18m915vq _1bto1l2s _o5721q9c _1ul9idpf",
|
|
20
21
|
lozenge: "_18u01b66 _1o9zidpf"
|
|
21
22
|
};
|
|
@@ -119,7 +120,7 @@ export var SelectionExtensionDropdownItem = function SelectionExtensionDropdownI
|
|
|
119
120
|
testId: EXTENSION_MENU_ITEM_TEST_ID
|
|
120
121
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
121
122
|
as: "span",
|
|
122
|
-
xcss: styles.contentWrapper,
|
|
123
|
+
xcss: fg('platform_editor_block_menu_v2_patch_5') ? styles.contentWrapperWithJustifyContent : styles.contentWrapper,
|
|
123
124
|
onMouseOver: handleMouseEnter
|
|
124
125
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
125
126
|
as: "span",
|
|
@@ -28,4 +28,6 @@ var SelectionExtensionDropdownMenuButtonComponent = function SelectionExtensionD
|
|
|
28
28
|
spacing: "none"
|
|
29
29
|
}));
|
|
30
30
|
};
|
|
31
|
+
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
31
33
|
export var SelectionExtensionDropdownMenuButton = injectIntl(SelectionExtensionDropdownMenuButtonComponent);
|
|
@@ -65,4 +65,6 @@ export var SelectionExtensionItemsComponent = function SelectionExtensionItemsCo
|
|
|
65
65
|
onItemActivated: handleOnItemActivated
|
|
66
66
|
});
|
|
67
67
|
};
|
|
68
|
+
|
|
69
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
68
70
|
export var SelectionExtensionItems = injectIntl(SelectionExtensionItemsComponent);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Provider } from 'react';
|
|
1
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
4
|
import type { SelectionExtensionPlugin } from '../selectionExtensionPluginType';
|
|
@@ -8,6 +9,6 @@ type SelectionExtensionComponentContextValue = {
|
|
|
8
9
|
extensionSource: string;
|
|
9
10
|
extensionLocation: 'inline-toolbar' | 'primary-toolbar' | 'block-menu';
|
|
10
11
|
};
|
|
11
|
-
export declare const SelectionExtensionComponentContextProvider:
|
|
12
|
+
export declare const SelectionExtensionComponentContextProvider: Provider<SelectionExtensionComponentContextValue | undefined>;
|
|
12
13
|
export declare const useSelectionExtensionComponentContext: () => SelectionExtensionComponentContextValue;
|
|
13
14
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
2
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { type MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
5
5
|
import { type MenuItemsType } from '../../types';
|
|
@@ -11,7 +11,7 @@ export type SelectionExtensionDropdownMenuProps = {
|
|
|
11
11
|
shouldCloseMenu?: boolean;
|
|
12
12
|
}) => void;
|
|
13
13
|
} & WrappedComponentProps;
|
|
14
|
-
export declare const SelectionExtensionDropdownMenu: React.FC<
|
|
14
|
+
export declare const SelectionExtensionDropdownMenu: React.FC<WithIntlProps<{
|
|
15
15
|
editorAnalyticsAPI?: EditorAnalyticsAPI;
|
|
16
16
|
items: MenuItemsType;
|
|
17
17
|
onItemActivated?: (attrs: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
2
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
4
4
|
type SelectionExtensionDropdownMenuButtonProps = React.ComponentProps<typeof ToolbarButton> & WrappedComponentProps;
|
|
5
|
-
export declare const SelectionExtensionDropdownMenuButton: React.FC<
|
|
5
|
+
export declare const SelectionExtensionDropdownMenuButton: React.FC<WithIntlProps<SelectionExtensionDropdownMenuButtonProps>> & {
|
|
6
6
|
WrappedComponent: React.ComponentType<SelectionExtensionDropdownMenuButtonProps>;
|
|
7
7
|
};
|
|
8
8
|
export {};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @jsx
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
6
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
7
7
|
import { type EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
8
8
|
import { type ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
9
9
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -17,7 +17,7 @@ type SelectionExtensionItemsProps = {
|
|
|
17
17
|
onExtensionClick: (extension: SelectionExtension) => void;
|
|
18
18
|
} & WrappedComponentProps;
|
|
19
19
|
export declare const SelectionExtensionItemsComponent: ({ extensions, onExtensionClick, editorAnalyticsAPI, }: SelectionExtensionItemsProps) => React.JSX.Element;
|
|
20
|
-
export declare const SelectionExtensionItems: React.FC<
|
|
20
|
+
export declare const SelectionExtensionItems: React.FC<WithIntlProps<SelectionExtensionItemsProps>> & {
|
|
21
21
|
WrappedComponent: React.ComponentType<SelectionExtensionItemsProps>;
|
|
22
22
|
};
|
|
23
23
|
export {};
|
|
@@ -7,5 +7,5 @@ type RegisterExtensionProps = {
|
|
|
7
7
|
extension: ExtensionConfiguration;
|
|
8
8
|
index: number;
|
|
9
9
|
};
|
|
10
|
-
export declare const registerInlineToolbar: ({ api, extension, index }: RegisterExtensionProps) => RegisterComponent[];
|
|
10
|
+
export declare const registerInlineToolbar: ({ api, extension, index, }: RegisterExtensionProps) => RegisterComponent[];
|
|
11
11
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Provider } from 'react';
|
|
1
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
4
|
import type { SelectionExtensionPlugin } from '../selectionExtensionPluginType';
|
|
@@ -8,6 +9,6 @@ type SelectionExtensionComponentContextValue = {
|
|
|
8
9
|
extensionSource: string;
|
|
9
10
|
extensionLocation: 'inline-toolbar' | 'primary-toolbar' | 'block-menu';
|
|
10
11
|
};
|
|
11
|
-
export declare const SelectionExtensionComponentContextProvider:
|
|
12
|
+
export declare const SelectionExtensionComponentContextProvider: Provider<SelectionExtensionComponentContextValue | undefined>;
|
|
12
13
|
export declare const useSelectionExtensionComponentContext: () => SelectionExtensionComponentContextValue;
|
|
13
14
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
2
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { type MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
5
5
|
import { type MenuItemsType } from '../../types';
|
|
@@ -11,7 +11,7 @@ export type SelectionExtensionDropdownMenuProps = {
|
|
|
11
11
|
shouldCloseMenu?: boolean;
|
|
12
12
|
}) => void;
|
|
13
13
|
} & WrappedComponentProps;
|
|
14
|
-
export declare const SelectionExtensionDropdownMenu: React.FC<
|
|
14
|
+
export declare const SelectionExtensionDropdownMenu: React.FC<WithIntlProps<{
|
|
15
15
|
editorAnalyticsAPI?: EditorAnalyticsAPI;
|
|
16
16
|
items: MenuItemsType;
|
|
17
17
|
onItemActivated?: (attrs: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
2
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
4
4
|
type SelectionExtensionDropdownMenuButtonProps = React.ComponentProps<typeof ToolbarButton> & WrappedComponentProps;
|
|
5
|
-
export declare const SelectionExtensionDropdownMenuButton: React.FC<
|
|
5
|
+
export declare const SelectionExtensionDropdownMenuButton: React.FC<WithIntlProps<SelectionExtensionDropdownMenuButtonProps>> & {
|
|
6
6
|
WrappedComponent: React.ComponentType<SelectionExtensionDropdownMenuButtonProps>;
|
|
7
7
|
};
|
|
8
8
|
export {};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @jsx
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
6
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
7
7
|
import { type EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
8
8
|
import { type ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
9
9
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -17,7 +17,7 @@ type SelectionExtensionItemsProps = {
|
|
|
17
17
|
onExtensionClick: (extension: SelectionExtension) => void;
|
|
18
18
|
} & WrappedComponentProps;
|
|
19
19
|
export declare const SelectionExtensionItemsComponent: ({ extensions, onExtensionClick, editorAnalyticsAPI, }: SelectionExtensionItemsProps) => React.JSX.Element;
|
|
20
|
-
export declare const SelectionExtensionItems: React.FC<
|
|
20
|
+
export declare const SelectionExtensionItems: React.FC<WithIntlProps<SelectionExtensionItemsProps>> & {
|
|
21
21
|
WrappedComponent: React.ComponentType<SelectionExtensionItemsProps>;
|
|
22
22
|
};
|
|
23
23
|
export {};
|
|
@@ -7,5 +7,5 @@ type RegisterExtensionProps = {
|
|
|
7
7
|
extension: ExtensionConfiguration;
|
|
8
8
|
index: number;
|
|
9
9
|
};
|
|
10
|
-
export declare const registerInlineToolbar: ({ api, extension, index }: RegisterExtensionProps) => RegisterComponent[];
|
|
10
|
+
export declare const registerInlineToolbar: ({ api, extension, index, }: RegisterExtensionProps) => RegisterComponent[];
|
|
11
11
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-selection-extension",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.2",
|
|
4
4
|
"description": "editor-plugin-selection-extension plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@atlaskit/lozenge": "^13.5.0",
|
|
53
53
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
54
54
|
"@atlaskit/primitives": "^18.0.0",
|
|
55
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
55
|
+
"@atlaskit/tmp-editor-statsig": "^36.1.0",
|
|
56
56
|
"@atlaskit/tokens": "^11.1.0",
|
|
57
57
|
"@babel/runtime": "^7.0.0",
|
|
58
58
|
"lodash": "^4.17.21",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"uuid": "^3.1.0"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@atlaskit/editor-common": "^112.
|
|
63
|
+
"@atlaskit/editor-common": "^112.1.0",
|
|
64
64
|
"react": "^18.2.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
@@ -122,6 +122,9 @@
|
|
|
122
122
|
"platform_editor_block_menu_v2_patch_3": {
|
|
123
123
|
"type": "boolean"
|
|
124
124
|
},
|
|
125
|
+
"platform_editor_block_menu_v2_patch_5": {
|
|
126
|
+
"type": "boolean"
|
|
127
|
+
},
|
|
125
128
|
"confluence_fronend_labels_categorization_migration": {
|
|
126
129
|
"type": "boolean"
|
|
127
130
|
}
|