@atlaskit/editor-plugin-block-type 22.0.7 → 22.0.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
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-type
|
|
2
2
|
|
|
3
|
+
## 22.0.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 22.0.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`a6ea70b003713`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a6ea70b003713) -
|
|
14
|
+
Improve the slash-command menu behind `platform_editor_slash_command`: add optional light and dark
|
|
15
|
+
preview image URLs, show theme-aware previews for headings, quote, and list commands, and set the
|
|
16
|
+
registered menu to 320px wide and up to 480px tall while allowing short menus to hug their
|
|
17
|
+
contents. Previews fall back to the light image when no dark image is supplied and are not shown
|
|
18
|
+
when no URLs are supplied.
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 22.0.7
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -55,6 +55,36 @@ var headingQuickInsertShortcuts = {
|
|
|
55
55
|
5: (_tooltip5 = (0, _keymaps.tooltip)(_keymaps.toggleHeading5)) !== null && _tooltip5 !== void 0 ? _tooltip5 : '',
|
|
56
56
|
6: (_tooltip6 = (0, _keymaps.tooltip)(_keymaps.toggleHeading6)) !== null && _tooltip6 !== void 0 ? _tooltip6 : ''
|
|
57
57
|
};
|
|
58
|
+
var previewImageUrls = {
|
|
59
|
+
blockquote: {
|
|
60
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/d4te57pv7j85c6xr1vui6q708733gfc3.png',
|
|
61
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/284qt5g0c4mqi24osl0df4s3ra301mpx.png'
|
|
62
|
+
},
|
|
63
|
+
1: {
|
|
64
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/hw6qyn044721b2m7v3102xik2llkf6qb.png',
|
|
65
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/1i1ff4is6g200qb6a4181fjecydch0kc.png'
|
|
66
|
+
},
|
|
67
|
+
2: {
|
|
68
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/8abbo27edjqrle6c78u8qj2j67707abu.png',
|
|
69
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/8rt7x7u7765v72l0ngw65em701u4s58l.png'
|
|
70
|
+
},
|
|
71
|
+
3: {
|
|
72
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/350xa31s48b471rf57xhr344rx8qs17a.png',
|
|
73
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/gyt13k2542x5bgq284m10n1hc4baf85j.png'
|
|
74
|
+
},
|
|
75
|
+
4: {
|
|
76
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/26goi016hs18n0r5243bdh8260ucp58n.png',
|
|
77
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/78356r6s0xwe71o13mfj381gpyqt4niq.png'
|
|
78
|
+
},
|
|
79
|
+
5: {
|
|
80
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/1uou5866vounmn58aunwxkfo20kk871o.png',
|
|
81
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/584t6547t6h570unr3v581oi154625lo.png'
|
|
82
|
+
},
|
|
83
|
+
6: {
|
|
84
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/5h60y538ycf7d7646t0k644iau08027l.png',
|
|
85
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/g3o407j1432fc405m45r82ygbfv44323.png'
|
|
86
|
+
}
|
|
87
|
+
};
|
|
58
88
|
var getHeadingQuickInsertMessages = exports.getHeadingQuickInsertMessages = function getHeadingQuickInsertMessages(level) {
|
|
59
89
|
return headingQuickInsertMessages[level];
|
|
60
90
|
};
|
|
@@ -139,6 +169,7 @@ var BlockTypeQuickInsertMenuItem = exports.BlockTypeQuickInsertMenuItem = functi
|
|
|
139
169
|
return /*#__PURE__*/_react.default.createElement(_menuItem.QuickInsertMenuItem, {
|
|
140
170
|
iconBefore: getBlockTypeQuickInsertIcon(item),
|
|
141
171
|
onSelect: onSelect,
|
|
172
|
+
previewImageUrls: previewImageUrls[item],
|
|
142
173
|
shortcut: shortcut,
|
|
143
174
|
title: title
|
|
144
175
|
});
|
|
@@ -46,6 +46,36 @@ const headingQuickInsertShortcuts = {
|
|
|
46
46
|
5: (_tooltip5 = tooltip(toggleHeading5)) !== null && _tooltip5 !== void 0 ? _tooltip5 : '',
|
|
47
47
|
6: (_tooltip6 = tooltip(toggleHeading6)) !== null && _tooltip6 !== void 0 ? _tooltip6 : ''
|
|
48
48
|
};
|
|
49
|
+
const previewImageUrls = {
|
|
50
|
+
blockquote: {
|
|
51
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/d4te57pv7j85c6xr1vui6q708733gfc3.png',
|
|
52
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/284qt5g0c4mqi24osl0df4s3ra301mpx.png'
|
|
53
|
+
},
|
|
54
|
+
1: {
|
|
55
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/hw6qyn044721b2m7v3102xik2llkf6qb.png',
|
|
56
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/1i1ff4is6g200qb6a4181fjecydch0kc.png'
|
|
57
|
+
},
|
|
58
|
+
2: {
|
|
59
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/8abbo27edjqrle6c78u8qj2j67707abu.png',
|
|
60
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/8rt7x7u7765v72l0ngw65em701u4s58l.png'
|
|
61
|
+
},
|
|
62
|
+
3: {
|
|
63
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/350xa31s48b471rf57xhr344rx8qs17a.png',
|
|
64
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/gyt13k2542x5bgq284m10n1hc4baf85j.png'
|
|
65
|
+
},
|
|
66
|
+
4: {
|
|
67
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/26goi016hs18n0r5243bdh8260ucp58n.png',
|
|
68
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/78356r6s0xwe71o13mfj381gpyqt4niq.png'
|
|
69
|
+
},
|
|
70
|
+
5: {
|
|
71
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/1uou5866vounmn58aunwxkfo20kk871o.png',
|
|
72
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/584t6547t6h570unr3v581oi154625lo.png'
|
|
73
|
+
},
|
|
74
|
+
6: {
|
|
75
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/5h60y538ycf7d7646t0k644iau08027l.png',
|
|
76
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/g3o407j1432fc405m45r82ygbfv44323.png'
|
|
77
|
+
}
|
|
78
|
+
};
|
|
49
79
|
export const getHeadingQuickInsertMessages = level => headingQuickInsertMessages[level];
|
|
50
80
|
export const getHeadingQuickInsertShortcut = level => headingQuickInsertShortcuts[level];
|
|
51
81
|
const getBlockTypeQuickInsertIcon = item => {
|
|
@@ -129,6 +159,7 @@ export const BlockTypeQuickInsertMenuItem = ({
|
|
|
129
159
|
return /*#__PURE__*/React.createElement(QuickInsertMenuItem, {
|
|
130
160
|
iconBefore: getBlockTypeQuickInsertIcon(item),
|
|
131
161
|
onSelect: onSelect,
|
|
162
|
+
previewImageUrls: previewImageUrls[item],
|
|
132
163
|
shortcut: shortcut,
|
|
133
164
|
title: title
|
|
134
165
|
});
|
|
@@ -46,6 +46,36 @@ var headingQuickInsertShortcuts = {
|
|
|
46
46
|
5: (_tooltip5 = tooltip(toggleHeading5)) !== null && _tooltip5 !== void 0 ? _tooltip5 : '',
|
|
47
47
|
6: (_tooltip6 = tooltip(toggleHeading6)) !== null && _tooltip6 !== void 0 ? _tooltip6 : ''
|
|
48
48
|
};
|
|
49
|
+
var previewImageUrls = {
|
|
50
|
+
blockquote: {
|
|
51
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/d4te57pv7j85c6xr1vui6q708733gfc3.png',
|
|
52
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/284qt5g0c4mqi24osl0df4s3ra301mpx.png'
|
|
53
|
+
},
|
|
54
|
+
1: {
|
|
55
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/hw6qyn044721b2m7v3102xik2llkf6qb.png',
|
|
56
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/1i1ff4is6g200qb6a4181fjecydch0kc.png'
|
|
57
|
+
},
|
|
58
|
+
2: {
|
|
59
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/8abbo27edjqrle6c78u8qj2j67707abu.png',
|
|
60
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/8rt7x7u7765v72l0ngw65em701u4s58l.png'
|
|
61
|
+
},
|
|
62
|
+
3: {
|
|
63
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/350xa31s48b471rf57xhr344rx8qs17a.png',
|
|
64
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/gyt13k2542x5bgq284m10n1hc4baf85j.png'
|
|
65
|
+
},
|
|
66
|
+
4: {
|
|
67
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/26goi016hs18n0r5243bdh8260ucp58n.png',
|
|
68
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/78356r6s0xwe71o13mfj381gpyqt4niq.png'
|
|
69
|
+
},
|
|
70
|
+
5: {
|
|
71
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/1uou5866vounmn58aunwxkfo20kk871o.png',
|
|
72
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/584t6547t6h570unr3v581oi154625lo.png'
|
|
73
|
+
},
|
|
74
|
+
6: {
|
|
75
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/5h60y538ycf7d7646t0k644iau08027l.png',
|
|
76
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/g3o407j1432fc405m45r82ygbfv44323.png'
|
|
77
|
+
}
|
|
78
|
+
};
|
|
49
79
|
export var getHeadingQuickInsertMessages = function getHeadingQuickInsertMessages(level) {
|
|
50
80
|
return headingQuickInsertMessages[level];
|
|
51
81
|
};
|
|
@@ -130,6 +160,7 @@ export var BlockTypeQuickInsertMenuItem = function BlockTypeQuickInsertMenuItem(
|
|
|
130
160
|
return /*#__PURE__*/React.createElement(QuickInsertMenuItem, {
|
|
131
161
|
iconBefore: getBlockTypeQuickInsertIcon(item),
|
|
132
162
|
onSelect: onSelect,
|
|
163
|
+
previewImageUrls: previewImageUrls[item],
|
|
133
164
|
shortcut: shortcut,
|
|
134
165
|
title: title
|
|
135
166
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-type",
|
|
3
|
-
"version": "22.0.
|
|
3
|
+
"version": "22.0.9",
|
|
4
4
|
"description": "BlockType plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
"@atlaskit/primitives": "^22.5.0",
|
|
44
44
|
"@atlaskit/prosemirror-history": "^1.2.0",
|
|
45
45
|
"@atlaskit/prosemirror-input-rules": "^4.1.0",
|
|
46
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
46
|
+
"@atlaskit/tmp-editor-statsig": "^197.0.0",
|
|
47
47
|
"@atlaskit/tokens": "^17.0.0",
|
|
48
48
|
"@babel/runtime": "^7.0.0",
|
|
49
49
|
"@compiled/react": "^1.0.2",
|
|
50
50
|
"@emotion/react": "^11.7.1"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@atlaskit/editor-common": "^122.
|
|
53
|
+
"@atlaskit/editor-common": "^122.8.0",
|
|
54
54
|
"react": "^18.2.0 || ^19.2.0",
|
|
55
55
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
56
56
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|