@atlaskit/editor-plugin-layout 19.0.10 → 19.0.11
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 +9 -0
- package/dist/cjs/ui/quick-insert/LayoutQuickInsertMenuItem.js +2 -0
- package/dist/cjs/ui/quick-insert/getLayoutQuickInsertComponents.js +18 -0
- package/dist/es2019/ui/quick-insert/LayoutQuickInsertMenuItem.js +2 -0
- package/dist/es2019/ui/quick-insert/getLayoutQuickInsertComponents.js +18 -0
- package/dist/esm/ui/quick-insert/LayoutQuickInsertMenuItem.js +2 -0
- package/dist/esm/ui/quick-insert/getLayoutQuickInsertComponents.js +18 -0
- package/dist/types/ui/quick-insert/LayoutQuickInsertMenuItem.d.ts +3 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-layout
|
|
2
2
|
|
|
3
|
+
## 19.0.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`88fb7a8d4013a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/88fb7a8d4013a) -
|
|
8
|
+
[ux] Add optional light and dark preview URLs to slash-command menu items and pass theme-aware
|
|
9
|
+
previews to supported commands when the `platform_editor_slash_command` experiment is enabled.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 19.0.10
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -26,6 +26,7 @@ var icons = {
|
|
|
26
26
|
var LayoutQuickInsertMenuItem = exports.LayoutQuickInsertMenuItem = function LayoutQuickInsertMenuItem(_ref) {
|
|
27
27
|
var api = _ref.api,
|
|
28
28
|
columnCount = _ref.columnCount,
|
|
29
|
+
previewImageUrls = _ref.previewImageUrls,
|
|
29
30
|
title = _ref.title;
|
|
30
31
|
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
31
32
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -54,6 +55,7 @@ var LayoutQuickInsertMenuItem = exports.LayoutQuickInsertMenuItem = function Lay
|
|
|
54
55
|
label: ""
|
|
55
56
|
}),
|
|
56
57
|
onSelect: onSelect,
|
|
58
|
+
previewImageUrls: previewImageUrls,
|
|
57
59
|
title: formatMessage(title)
|
|
58
60
|
});
|
|
59
61
|
};
|
|
@@ -16,24 +16,40 @@ var layoutItems = [{
|
|
|
16
16
|
description: _messages.toolbarInsertBlockMessages.columnsDescriptionAdvancedLayout,
|
|
17
17
|
item: _keys.TWO_COLUMNS_LAYOUT_MENU_ITEM,
|
|
18
18
|
keyword: 'two column',
|
|
19
|
+
previewImageUrls: {
|
|
20
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/0iw817624sqeag4khc1xcy63873q21rq.png',
|
|
21
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/54ofhg00x870clknn4332akh40g8u3w2.png'
|
|
22
|
+
},
|
|
19
23
|
title: _messages.layoutMessages.twoColumnsAdvancedLayout
|
|
20
24
|
}, {
|
|
21
25
|
columnCount: 3,
|
|
22
26
|
description: _messages.toolbarInsertBlockMessages.columnsDescriptionAdvancedLayout,
|
|
23
27
|
item: _keys.THREE_COLUMNS_LAYOUT_MENU_ITEM,
|
|
24
28
|
keyword: 'three column',
|
|
29
|
+
previewImageUrls: {
|
|
30
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/jly0ydm2oi818u507kt807jsi54du81d.png',
|
|
31
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/12qobcpeyt16r8coi03arj643b7oq780.png'
|
|
32
|
+
},
|
|
25
33
|
title: _messages.layoutMessages.threeColumnsAdvancedLayout
|
|
26
34
|
}, {
|
|
27
35
|
columnCount: 4,
|
|
28
36
|
description: _messages.toolbarInsertBlockMessages.columnsDescriptionAdvancedLayout,
|
|
29
37
|
item: _keys.FOUR_COLUMNS_LAYOUT_MENU_ITEM,
|
|
30
38
|
keyword: 'four column',
|
|
39
|
+
previewImageUrls: {
|
|
40
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/qxypnub871i55c81u236hb736y4008d7.png',
|
|
41
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/7t6ryd4ek4gob4634vr4u31m0l4760el.png'
|
|
42
|
+
},
|
|
31
43
|
title: _messages.layoutMessages.fourColumns
|
|
32
44
|
}, {
|
|
33
45
|
columnCount: 5,
|
|
34
46
|
description: _messages.toolbarInsertBlockMessages.columnsDescriptionAdvancedLayout,
|
|
35
47
|
item: _keys.FIVE_COLUMNS_LAYOUT_MENU_ITEM,
|
|
36
48
|
keyword: 'five column',
|
|
49
|
+
previewImageUrls: {
|
|
50
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/10ffd735631hbf21r5lr4dophlp6702a.png',
|
|
51
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/ma21tr7mfw721t0tr31n80j33g032b78.png'
|
|
52
|
+
},
|
|
37
53
|
title: _messages.layoutMessages.fiveColumns
|
|
38
54
|
}];
|
|
39
55
|
var getLayoutQuickInsertComponents = exports.getLayoutQuickInsertComponents = function getLayoutQuickInsertComponents(_ref) {
|
|
@@ -43,6 +59,7 @@ var getLayoutQuickInsertComponents = exports.getLayoutQuickInsertComponents = fu
|
|
|
43
59
|
description = _ref2.description,
|
|
44
60
|
item = _ref2.item,
|
|
45
61
|
keyword = _ref2.keyword,
|
|
62
|
+
previewImageUrls = _ref2.previewImageUrls,
|
|
46
63
|
title = _ref2.title;
|
|
47
64
|
return {
|
|
48
65
|
key: item.key,
|
|
@@ -66,6 +83,7 @@ var getLayoutQuickInsertComponents = exports.getLayoutQuickInsertComponents = fu
|
|
|
66
83
|
return /*#__PURE__*/_react.default.createElement(_LayoutQuickInsertMenuItem.LayoutQuickInsertMenuItem, {
|
|
67
84
|
api: api,
|
|
68
85
|
columnCount: columnCount,
|
|
86
|
+
previewImageUrls: previewImageUrls,
|
|
69
87
|
title: title
|
|
70
88
|
});
|
|
71
89
|
}
|
|
@@ -17,6 +17,7 @@ const icons = {
|
|
|
17
17
|
export const LayoutQuickInsertMenuItem = ({
|
|
18
18
|
api,
|
|
19
19
|
columnCount,
|
|
20
|
+
previewImageUrls,
|
|
20
21
|
title
|
|
21
22
|
}) => {
|
|
22
23
|
const {
|
|
@@ -48,6 +49,7 @@ export const LayoutQuickInsertMenuItem = ({
|
|
|
48
49
|
label: ""
|
|
49
50
|
}),
|
|
50
51
|
onSelect: onSelect,
|
|
52
|
+
previewImageUrls: previewImageUrls,
|
|
51
53
|
title: formatMessage(title)
|
|
52
54
|
});
|
|
53
55
|
};
|
|
@@ -9,24 +9,40 @@ const layoutItems = [{
|
|
|
9
9
|
description: messages.columnsDescriptionAdvancedLayout,
|
|
10
10
|
item: TWO_COLUMNS_LAYOUT_MENU_ITEM,
|
|
11
11
|
keyword: 'two column',
|
|
12
|
+
previewImageUrls: {
|
|
13
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/0iw817624sqeag4khc1xcy63873q21rq.png',
|
|
14
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/54ofhg00x870clknn4332akh40g8u3w2.png'
|
|
15
|
+
},
|
|
12
16
|
title: layoutMessages.twoColumnsAdvancedLayout
|
|
13
17
|
}, {
|
|
14
18
|
columnCount: 3,
|
|
15
19
|
description: messages.columnsDescriptionAdvancedLayout,
|
|
16
20
|
item: THREE_COLUMNS_LAYOUT_MENU_ITEM,
|
|
17
21
|
keyword: 'three column',
|
|
22
|
+
previewImageUrls: {
|
|
23
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/jly0ydm2oi818u507kt807jsi54du81d.png',
|
|
24
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/12qobcpeyt16r8coi03arj643b7oq780.png'
|
|
25
|
+
},
|
|
18
26
|
title: layoutMessages.threeColumnsAdvancedLayout
|
|
19
27
|
}, {
|
|
20
28
|
columnCount: 4,
|
|
21
29
|
description: messages.columnsDescriptionAdvancedLayout,
|
|
22
30
|
item: FOUR_COLUMNS_LAYOUT_MENU_ITEM,
|
|
23
31
|
keyword: 'four column',
|
|
32
|
+
previewImageUrls: {
|
|
33
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/qxypnub871i55c81u236hb736y4008d7.png',
|
|
34
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/7t6ryd4ek4gob4634vr4u31m0l4760el.png'
|
|
35
|
+
},
|
|
24
36
|
title: layoutMessages.fourColumns
|
|
25
37
|
}, {
|
|
26
38
|
columnCount: 5,
|
|
27
39
|
description: messages.columnsDescriptionAdvancedLayout,
|
|
28
40
|
item: FIVE_COLUMNS_LAYOUT_MENU_ITEM,
|
|
29
41
|
keyword: 'five column',
|
|
42
|
+
previewImageUrls: {
|
|
43
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/10ffd735631hbf21r5lr4dophlp6702a.png',
|
|
44
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/ma21tr7mfw721t0tr31n80j33g032b78.png'
|
|
45
|
+
},
|
|
30
46
|
title: layoutMessages.fiveColumns
|
|
31
47
|
}];
|
|
32
48
|
export const getLayoutQuickInsertComponents = ({
|
|
@@ -36,6 +52,7 @@ export const getLayoutQuickInsertComponents = ({
|
|
|
36
52
|
description,
|
|
37
53
|
item,
|
|
38
54
|
keyword,
|
|
55
|
+
previewImageUrls,
|
|
39
56
|
title
|
|
40
57
|
}) => ({
|
|
41
58
|
key: item.key,
|
|
@@ -57,6 +74,7 @@ export const getLayoutQuickInsertComponents = ({
|
|
|
57
74
|
component: () => /*#__PURE__*/React.createElement(LayoutQuickInsertMenuItem, {
|
|
58
75
|
api: api,
|
|
59
76
|
columnCount: columnCount,
|
|
77
|
+
previewImageUrls: previewImageUrls,
|
|
60
78
|
title: title
|
|
61
79
|
})
|
|
62
80
|
}));
|
|
@@ -17,6 +17,7 @@ var icons = {
|
|
|
17
17
|
export var LayoutQuickInsertMenuItem = function LayoutQuickInsertMenuItem(_ref) {
|
|
18
18
|
var api = _ref.api,
|
|
19
19
|
columnCount = _ref.columnCount,
|
|
20
|
+
previewImageUrls = _ref.previewImageUrls,
|
|
20
21
|
title = _ref.title;
|
|
21
22
|
var _useIntl = useIntl(),
|
|
22
23
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -45,6 +46,7 @@ export var LayoutQuickInsertMenuItem = function LayoutQuickInsertMenuItem(_ref)
|
|
|
45
46
|
label: ""
|
|
46
47
|
}),
|
|
47
48
|
onSelect: onSelect,
|
|
49
|
+
previewImageUrls: previewImageUrls,
|
|
48
50
|
title: formatMessage(title)
|
|
49
51
|
});
|
|
50
52
|
};
|
|
@@ -9,24 +9,40 @@ var layoutItems = [{
|
|
|
9
9
|
description: messages.columnsDescriptionAdvancedLayout,
|
|
10
10
|
item: TWO_COLUMNS_LAYOUT_MENU_ITEM,
|
|
11
11
|
keyword: 'two column',
|
|
12
|
+
previewImageUrls: {
|
|
13
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/0iw817624sqeag4khc1xcy63873q21rq.png',
|
|
14
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/54ofhg00x870clknn4332akh40g8u3w2.png'
|
|
15
|
+
},
|
|
12
16
|
title: layoutMessages.twoColumnsAdvancedLayout
|
|
13
17
|
}, {
|
|
14
18
|
columnCount: 3,
|
|
15
19
|
description: messages.columnsDescriptionAdvancedLayout,
|
|
16
20
|
item: THREE_COLUMNS_LAYOUT_MENU_ITEM,
|
|
17
21
|
keyword: 'three column',
|
|
22
|
+
previewImageUrls: {
|
|
23
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/jly0ydm2oi818u507kt807jsi54du81d.png',
|
|
24
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/12qobcpeyt16r8coi03arj643b7oq780.png'
|
|
25
|
+
},
|
|
18
26
|
title: layoutMessages.threeColumnsAdvancedLayout
|
|
19
27
|
}, {
|
|
20
28
|
columnCount: 4,
|
|
21
29
|
description: messages.columnsDescriptionAdvancedLayout,
|
|
22
30
|
item: FOUR_COLUMNS_LAYOUT_MENU_ITEM,
|
|
23
31
|
keyword: 'four column',
|
|
32
|
+
previewImageUrls: {
|
|
33
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/qxypnub871i55c81u236hb736y4008d7.png',
|
|
34
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/7t6ryd4ek4gob4634vr4u31m0l4760el.png'
|
|
35
|
+
},
|
|
24
36
|
title: layoutMessages.fourColumns
|
|
25
37
|
}, {
|
|
26
38
|
columnCount: 5,
|
|
27
39
|
description: messages.columnsDescriptionAdvancedLayout,
|
|
28
40
|
item: FIVE_COLUMNS_LAYOUT_MENU_ITEM,
|
|
29
41
|
keyword: 'five column',
|
|
42
|
+
previewImageUrls: {
|
|
43
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/10ffd735631hbf21r5lr4dophlp6702a.png',
|
|
44
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/ma21tr7mfw721t0tr31n80j33g032b78.png'
|
|
45
|
+
},
|
|
30
46
|
title: layoutMessages.fiveColumns
|
|
31
47
|
}];
|
|
32
48
|
export var getLayoutQuickInsertComponents = function getLayoutQuickInsertComponents(_ref) {
|
|
@@ -36,6 +52,7 @@ export var getLayoutQuickInsertComponents = function getLayoutQuickInsertCompone
|
|
|
36
52
|
description = _ref2.description,
|
|
37
53
|
item = _ref2.item,
|
|
38
54
|
keyword = _ref2.keyword,
|
|
55
|
+
previewImageUrls = _ref2.previewImageUrls,
|
|
39
56
|
title = _ref2.title;
|
|
40
57
|
return {
|
|
41
58
|
key: item.key,
|
|
@@ -59,6 +76,7 @@ export var getLayoutQuickInsertComponents = function getLayoutQuickInsertCompone
|
|
|
59
76
|
return /*#__PURE__*/React.createElement(LayoutQuickInsertMenuItem, {
|
|
60
77
|
api: api,
|
|
61
78
|
columnCount: columnCount,
|
|
79
|
+
previewImageUrls: previewImageUrls,
|
|
62
80
|
title: title
|
|
63
81
|
});
|
|
64
82
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { MessageDescriptor } from 'react-intl';
|
|
3
|
+
import { type QuickInsertMenuItemProps } from '@atlaskit/editor-common/quick-insert/menu-item';
|
|
3
4
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
5
|
import type { LayoutPlugin } from '../../layoutPluginType';
|
|
5
6
|
type Props = {
|
|
6
7
|
api: ExtractInjectionAPI<LayoutPlugin> | undefined;
|
|
7
8
|
columnCount: 2 | 3 | 4 | 5;
|
|
9
|
+
previewImageUrls?: QuickInsertMenuItemProps['previewImageUrls'];
|
|
8
10
|
title: MessageDescriptor;
|
|
9
11
|
};
|
|
10
|
-
export declare const LayoutQuickInsertMenuItem: ({ api, columnCount, title, }: Props) => React.JSX.Element;
|
|
12
|
+
export declare const LayoutQuickInsertMenuItem: ({ api, columnCount, previewImageUrls, title, }: Props) => React.JSX.Element;
|
|
11
13
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-layout",
|
|
3
|
-
"version": "19.0.
|
|
3
|
+
"version": "19.0.11",
|
|
4
4
|
"description": "Layout plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@atlaskit/editor-plugin-decorations": "^18.0.0",
|
|
30
30
|
"@atlaskit/editor-plugin-editor-disabled": "^18.0.0",
|
|
31
31
|
"@atlaskit/editor-plugin-guideline": "^18.0.0",
|
|
32
|
-
"@atlaskit/editor-plugin-interaction": "^
|
|
32
|
+
"@atlaskit/editor-plugin-interaction": "^31.0.0",
|
|
33
33
|
"@atlaskit/editor-plugin-selection": "^18.0.0",
|
|
34
34
|
"@atlaskit/editor-plugin-toolbar": "^15.0.0",
|
|
35
35
|
"@atlaskit/editor-plugin-ui-control-registry": "^12.0.0",
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
"@atlaskit/icon-lab": "^7.9.0",
|
|
44
44
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
46
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
47
|
-
"@atlaskit/tokens": "^
|
|
46
|
+
"@atlaskit/tmp-editor-statsig": "^199.0.0",
|
|
47
|
+
"@atlaskit/tokens": "^18.0.0",
|
|
48
48
|
"@babel/runtime": "^7.0.0",
|
|
49
49
|
"@emotion/react": "^11.7.1",
|
|
50
50
|
"bind-event-listener": "^3.0.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@atlaskit/editor-common": "^122.
|
|
53
|
+
"@atlaskit/editor-common": "^122.11.0",
|
|
54
54
|
"react": "^18.2.0 || ^19.2.0",
|
|
55
55
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
56
56
|
},
|