@atlaskit/editor-plugin-emoji 22.0.3 → 22.0.4
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,32 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-emoji
|
|
2
2
|
|
|
3
|
+
## 22.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a034f535638cc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a034f535638cc) -
|
|
8
|
+
Add structured Quick Insert previews with localised title, description and attribution under
|
|
9
|
+
platform_editor_slash_command.
|
|
10
|
+
|
|
11
|
+
Exclude footer and category navigation actions from previews. Left-align attribution, use subtle
|
|
12
|
+
title and attribution text, and default description text.
|
|
13
|
+
|
|
14
|
+
Show text previews even without preview metadata, and reserve a fixed image area while images load
|
|
15
|
+
or when they fail. Keep previews within the viewport, flipping left when needed, with compact
|
|
16
|
+
panel dimensions and typography.
|
|
17
|
+
|
|
18
|
+
Replace baked panel screenshots with image-only assets. Remove image fields from text-only legacy
|
|
19
|
+
previews while preserving their attribution.
|
|
20
|
+
|
|
21
|
+
Let extension providers own their preview images and attribution. Pass preview metadata through
|
|
22
|
+
the Company Hub manifest factory and remove Editor's fallback preview registry.
|
|
23
|
+
|
|
24
|
+
Localize provider attribution names and display Confluence and Jira product icons instead of the
|
|
25
|
+
attribution prefix when an icon is present. Allow the Dropbox manifest to receive the host's
|
|
26
|
+
message formatter.
|
|
27
|
+
|
|
28
|
+
- Updated dependencies
|
|
29
|
+
|
|
3
30
|
## 22.0.3
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
|
@@ -10,26 +10,36 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _reactIntl = require("react-intl");
|
|
11
11
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
12
12
|
var _menuItem = require("@atlaskit/editor-common/quick-insert/menu-item");
|
|
13
|
+
var _messages2 = require("@atlaskit/editor-common/quick-insert/messages");
|
|
13
14
|
var _emoji = _interopRequireDefault(require("@atlaskit/icon/core/emoji"));
|
|
14
15
|
var _actions = require("../../pm-plugins/actions");
|
|
15
16
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
16
17
|
var previewImageUrls = {
|
|
17
|
-
dark: 'https://dam-cdn.atl.orangelogic.com/
|
|
18
|
-
light: 'https://dam-cdn.atl.orangelogic.com/
|
|
18
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/CDNLink/AT12OVH4.png',
|
|
19
|
+
light: 'https://dam-cdn.atl.orangelogic.com/CDNLink/AT12OVKH.png'
|
|
19
20
|
};
|
|
20
21
|
var EmojiQuickInsertMenuItem = exports.EmojiQuickInsertMenuItem = function EmojiQuickInsertMenuItem() {
|
|
21
22
|
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
22
23
|
formatMessage = _useIntl.formatMessage;
|
|
24
|
+
var preview = (0, _react.useMemo)(function () {
|
|
25
|
+
return {
|
|
26
|
+
image: previewImageUrls,
|
|
27
|
+
attribution: {
|
|
28
|
+
name: formatMessage(_messages2.messages.previewAttributionAtlassian)
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}, [formatMessage]);
|
|
23
32
|
var onSelect = (0, _react.useCallback)(function (_ref) {
|
|
24
33
|
var insert = _ref.insert;
|
|
25
34
|
return (0, _actions.setInlineEmojiPopupOpen)(true)(insert(''));
|
|
26
35
|
}, []);
|
|
27
36
|
return /*#__PURE__*/_react.default.createElement(_menuItem.QuickInsertMenuItem, {
|
|
37
|
+
description: formatMessage(_messages.toolbarInsertBlockMessages.emojiDescription),
|
|
28
38
|
iconBefore: /*#__PURE__*/_react.default.createElement(_emoji.default, {
|
|
29
39
|
label: ""
|
|
30
40
|
}),
|
|
31
41
|
onSelect: onSelect,
|
|
32
|
-
|
|
42
|
+
preview: preview,
|
|
33
43
|
shortcut: ":",
|
|
34
44
|
title: formatMessage(_messages.toolbarInsertBlockMessages.emoji)
|
|
35
45
|
});
|
|
@@ -1,26 +1,34 @@
|
|
|
1
|
-
import React, { useCallback } from 'react';
|
|
1
|
+
import React, { useCallback, useMemo } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
3
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
4
4
|
import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-item';
|
|
5
|
+
import { messages as quickInsertMessages } from '@atlaskit/editor-common/quick-insert/messages';
|
|
5
6
|
import EmojiIcon from '@atlaskit/icon/core/emoji';
|
|
6
7
|
import { setInlineEmojiPopupOpen } from '../../pm-plugins/actions';
|
|
7
8
|
const previewImageUrls = {
|
|
8
|
-
dark: 'https://dam-cdn.atl.orangelogic.com/
|
|
9
|
-
light: 'https://dam-cdn.atl.orangelogic.com/
|
|
9
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/CDNLink/AT12OVH4.png',
|
|
10
|
+
light: 'https://dam-cdn.atl.orangelogic.com/CDNLink/AT12OVKH.png'
|
|
10
11
|
};
|
|
11
12
|
export const EmojiQuickInsertMenuItem = () => {
|
|
12
13
|
const {
|
|
13
14
|
formatMessage
|
|
14
15
|
} = useIntl();
|
|
16
|
+
const preview = useMemo(() => ({
|
|
17
|
+
image: previewImageUrls,
|
|
18
|
+
attribution: {
|
|
19
|
+
name: formatMessage(quickInsertMessages.previewAttributionAtlassian)
|
|
20
|
+
}
|
|
21
|
+
}), [formatMessage]);
|
|
15
22
|
const onSelect = useCallback(({
|
|
16
23
|
insert
|
|
17
24
|
}) => setInlineEmojiPopupOpen(true)(insert('')), []);
|
|
18
25
|
return /*#__PURE__*/React.createElement(QuickInsertMenuItem, {
|
|
26
|
+
description: formatMessage(messages.emojiDescription),
|
|
19
27
|
iconBefore: /*#__PURE__*/React.createElement(EmojiIcon, {
|
|
20
28
|
label: ""
|
|
21
29
|
}),
|
|
22
30
|
onSelect: onSelect,
|
|
23
|
-
|
|
31
|
+
preview: preview,
|
|
24
32
|
shortcut: ":",
|
|
25
33
|
title: formatMessage(messages.emoji)
|
|
26
34
|
});
|
|
@@ -1,26 +1,36 @@
|
|
|
1
|
-
import React, { useCallback } from 'react';
|
|
1
|
+
import React, { useCallback, useMemo } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
3
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
4
4
|
import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-item';
|
|
5
|
+
import { messages as quickInsertMessages } from '@atlaskit/editor-common/quick-insert/messages';
|
|
5
6
|
import EmojiIcon from '@atlaskit/icon/core/emoji';
|
|
6
7
|
import { setInlineEmojiPopupOpen } from '../../pm-plugins/actions';
|
|
7
8
|
var previewImageUrls = {
|
|
8
|
-
dark: 'https://dam-cdn.atl.orangelogic.com/
|
|
9
|
-
light: 'https://dam-cdn.atl.orangelogic.com/
|
|
9
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/CDNLink/AT12OVH4.png',
|
|
10
|
+
light: 'https://dam-cdn.atl.orangelogic.com/CDNLink/AT12OVKH.png'
|
|
10
11
|
};
|
|
11
12
|
export var EmojiQuickInsertMenuItem = function EmojiQuickInsertMenuItem() {
|
|
12
13
|
var _useIntl = useIntl(),
|
|
13
14
|
formatMessage = _useIntl.formatMessage;
|
|
15
|
+
var preview = useMemo(function () {
|
|
16
|
+
return {
|
|
17
|
+
image: previewImageUrls,
|
|
18
|
+
attribution: {
|
|
19
|
+
name: formatMessage(quickInsertMessages.previewAttributionAtlassian)
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
}, [formatMessage]);
|
|
14
23
|
var onSelect = useCallback(function (_ref) {
|
|
15
24
|
var insert = _ref.insert;
|
|
16
25
|
return setInlineEmojiPopupOpen(true)(insert(''));
|
|
17
26
|
}, []);
|
|
18
27
|
return /*#__PURE__*/React.createElement(QuickInsertMenuItem, {
|
|
28
|
+
description: formatMessage(messages.emojiDescription),
|
|
19
29
|
iconBefore: /*#__PURE__*/React.createElement(EmojiIcon, {
|
|
20
30
|
label: ""
|
|
21
31
|
}),
|
|
22
32
|
onSelect: onSelect,
|
|
23
|
-
|
|
33
|
+
preview: preview,
|
|
24
34
|
shortcut: ":",
|
|
25
35
|
title: formatMessage(messages.emoji)
|
|
26
36
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-emoji",
|
|
3
|
-
"version": "22.0.
|
|
3
|
+
"version": "22.0.4",
|
|
4
4
|
"description": "Emoji plugin for @atlaskit/editor-core",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@atlaskit/editor-plugin-connectivity": "^21.0.0",
|
|
31
31
|
"@atlaskit/editor-plugin-editor-viewmode": "^23.0.0",
|
|
32
32
|
"@atlaskit/editor-plugin-metrics": "^22.0.0",
|
|
33
|
-
"@atlaskit/editor-plugin-type-ahead": "^22.
|
|
33
|
+
"@atlaskit/editor-plugin-type-ahead": "^22.1.0",
|
|
34
34
|
"@atlaskit/editor-plugin-ui-control-registry": "^15.0.0",
|
|
35
35
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
36
36
|
"@atlaskit/editor-shared-styles": "^4.3.0",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
42
42
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
43
43
|
"@atlaskit/prosemirror-input-rules": "^4.1.0",
|
|
44
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
44
|
+
"@atlaskit/tmp-editor-statsig": "^209.0.0",
|
|
45
45
|
"@atlaskit/tokens": "^20.0.0",
|
|
46
46
|
"@babel/runtime": "^7.0.0",
|
|
47
47
|
"@emotion/react": "^11.7.1",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"react-loadable": "^5.1.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@atlaskit/editor-common": "^125.
|
|
53
|
+
"@atlaskit/editor-common": "^125.4.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"
|