@atlaskit/editor-plugin-emoji 1.3.3 → 1.4.0

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,27 @@
1
1
  # @atlaskit/editor-plugin-emoji
2
2
 
3
+ ## 1.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#114156](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/114156)
8
+ [`bc6a63af2d1d0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bc6a63af2d1d0) -
9
+ Bump adf-schema to 37.0.0 and adf-schema-json to 1.16.0
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 1.3.4
16
+
17
+ ### Patch Changes
18
+
19
+ - [#110390](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/110390)
20
+ [`bead123202369`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bead123202369) -
21
+ [ux] [ED-23642] Reordering the typeahead so that date, status, code block & info panel are above
22
+ the fold (in the top 5 results)
23
+ - Updated dependencies
24
+
3
25
  ## 1.3.3
4
26
 
5
27
  ### Patch Changes
@@ -231,12 +231,13 @@ var emojiPlugin = exports.emojiPlugin = function emojiPlugin(_ref2) {
231
231
  },
232
232
  pluginsOptions: {
233
233
  quickInsert: function quickInsert(_ref9) {
234
+ var _options$getEditorFea;
234
235
  var formatMessage = _ref9.formatMessage;
235
236
  return [{
236
237
  id: 'emoji',
237
238
  title: formatMessage(_messages.toolbarInsertBlockMessages.emoji),
238
239
  description: formatMessage(_messages.toolbarInsertBlockMessages.emojiDescription),
239
- priority: 500,
240
+ priority: options !== null && options !== void 0 && (_options$getEditorFea = options.getEditorFeatureFlags) !== null && _options$getEditorFea !== void 0 && _options$getEditorFea.call(options).platformEditorTypeaheadImprovedRelevancy ? 700 : 500,
240
241
  keyshortcut: ':',
241
242
  icon: function icon() {
242
243
  return /*#__PURE__*/_react.default.createElement(_quickInsert.IconEmoji, null);
@@ -10,6 +10,7 @@ var _react = require("@emotion/react");
10
10
  var _emoji = require("@atlaskit/editor-common/emoji");
11
11
  var _templateObject;
12
12
  /** @jsx jsx */
13
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
13
14
  // eslint-disable-next-line
14
15
  var clickSelectWrapperStyle = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage\n\tuser-select: all;\n"])));
15
16
  function EmojiNode(props) {
@@ -214,23 +214,26 @@ export const emojiPlugin = ({
214
214
  pluginsOptions: {
215
215
  quickInsert: ({
216
216
  formatMessage
217
- }) => [{
218
- id: 'emoji',
219
- title: formatMessage(messages.emoji),
220
- description: formatMessage(messages.emojiDescription),
221
- priority: 500,
222
- keyshortcut: ':',
223
- icon: () => /*#__PURE__*/React.createElement(IconEmoji, null),
224
- action(insert, state) {
225
- var _api$typeAhead2;
226
- const tr = insert(undefined);
227
- api === null || api === void 0 ? void 0 : (_api$typeAhead2 = api.typeAhead) === null || _api$typeAhead2 === void 0 ? void 0 : _api$typeAhead2.actions.openAtTransaction({
228
- triggerHandler: typeAhead,
229
- inputMethod: INPUT_METHOD.QUICK_INSERT
230
- })(tr);
231
- return tr;
232
- }
233
- }],
217
+ }) => {
218
+ var _options$getEditorFea;
219
+ return [{
220
+ id: 'emoji',
221
+ title: formatMessage(messages.emoji),
222
+ description: formatMessage(messages.emojiDescription),
223
+ priority: options !== null && options !== void 0 && (_options$getEditorFea = options.getEditorFeatureFlags) !== null && _options$getEditorFea !== void 0 && _options$getEditorFea.call(options).platformEditorTypeaheadImprovedRelevancy ? 700 : 500,
224
+ keyshortcut: ':',
225
+ icon: () => /*#__PURE__*/React.createElement(IconEmoji, null),
226
+ action(insert, state) {
227
+ var _api$typeAhead2;
228
+ const tr = insert(undefined);
229
+ api === null || api === void 0 ? void 0 : (_api$typeAhead2 = api.typeAhead) === null || _api$typeAhead2 === void 0 ? void 0 : _api$typeAhead2.actions.openAtTransaction({
230
+ triggerHandler: typeAhead,
231
+ inputMethod: INPUT_METHOD.QUICK_INSERT
232
+ })(tr);
233
+ return tr;
234
+ }
235
+ }];
236
+ },
234
237
  typeAhead
235
238
  }
236
239
  };
@@ -1,4 +1,5 @@
1
1
  /** @jsx jsx */
2
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
3
  import { css, jsx } from '@emotion/react';
3
4
  import { Emoji } from '@atlaskit/editor-common/emoji';
4
5
  // eslint-disable-next-line
@@ -218,12 +218,13 @@ export var emojiPlugin = function emojiPlugin(_ref2) {
218
218
  },
219
219
  pluginsOptions: {
220
220
  quickInsert: function quickInsert(_ref9) {
221
+ var _options$getEditorFea;
221
222
  var formatMessage = _ref9.formatMessage;
222
223
  return [{
223
224
  id: 'emoji',
224
225
  title: formatMessage(messages.emoji),
225
226
  description: formatMessage(messages.emojiDescription),
226
- priority: 500,
227
+ priority: options !== null && options !== void 0 && (_options$getEditorFea = options.getEditorFeatureFlags) !== null && _options$getEditorFea !== void 0 && _options$getEditorFea.call(options).platformEditorTypeaheadImprovedRelevancy ? 700 : 500,
227
228
  keyshortcut: ':',
228
229
  icon: function icon() {
229
230
  return /*#__PURE__*/React.createElement(IconEmoji, null);
@@ -1,6 +1,7 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
  var _templateObject;
3
3
  /** @jsx jsx */
4
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
5
  import { css, jsx } from '@emotion/react';
5
6
  import { Emoji } from '@atlaskit/editor-common/emoji';
6
7
  // eslint-disable-next-line
@@ -1,10 +1,11 @@
1
1
  import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
- import type { EditorCommand, NextEditorPlugin, OptionalPlugin, TypeAheadHandler } from '@atlaskit/editor-common/types';
2
+ import type { EditorCommand, GetEditorFeatureFlags, NextEditorPlugin, OptionalPlugin, TypeAheadHandler } from '@atlaskit/editor-common/types';
3
3
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
4
4
  import type { TypeAheadInputMethod, TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
5
5
  import type { EmojiDescription, EmojiId, EmojiProvider, EmojiResourceConfig } from '@atlaskit/emoji';
6
6
  export interface EmojiPluginOptions {
7
7
  headless?: boolean;
8
+ getEditorFeatureFlags?: GetEditorFeatureFlags;
8
9
  }
9
10
  export type EmojiPluginState = {
10
11
  emojiProvider?: EmojiProvider;
@@ -1,10 +1,11 @@
1
1
  import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
- import type { EditorCommand, NextEditorPlugin, OptionalPlugin, TypeAheadHandler } from '@atlaskit/editor-common/types';
2
+ import type { EditorCommand, GetEditorFeatureFlags, NextEditorPlugin, OptionalPlugin, TypeAheadHandler } from '@atlaskit/editor-common/types';
3
3
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
4
4
  import type { TypeAheadInputMethod, TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
5
5
  import type { EmojiDescription, EmojiId, EmojiProvider, EmojiResourceConfig } from '@atlaskit/emoji';
6
6
  export interface EmojiPluginOptions {
7
7
  headless?: boolean;
8
+ getEditorFeatureFlags?: GetEditorFeatureFlags;
8
9
  }
9
10
  export type EmojiPluginState = {
10
11
  emojiProvider?: EmojiProvider;
package/package.json CHANGED
@@ -1,94 +1,94 @@
1
1
  {
2
- "name": "@atlaskit/editor-plugin-emoji",
3
- "version": "1.3.3",
4
- "description": "Emoji plugin for @atlaskit/editor-core",
5
- "publishConfig": {
6
- "registry": "https://registry.npmjs.org/"
7
- },
8
- "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
9
- "author": "Atlassian Pty Ltd",
10
- "license": "Apache-2.0",
11
- "main": "dist/cjs/index.js",
12
- "module": "dist/esm/index.js",
13
- "module:es2019": "dist/es2019/index.js",
14
- "types": "dist/types/index.d.ts",
15
- "sideEffects": false,
16
- "atlaskit:src": "src/index.ts",
17
- "atlassian": {
18
- "team": "Editor: Media Experience Porygon",
19
- "releaseModel": "continuous",
20
- "singleton": true,
21
- "runReact18": false
22
- },
23
- "dependencies": {
24
- "@atlaskit/adf-schema": "^36.10.7",
25
- "@atlaskit/editor-common": "^82.0.0",
26
- "@atlaskit/editor-plugin-analytics": "^1.2.0",
27
- "@atlaskit/editor-plugin-type-ahead": "^1.2.0",
28
- "@atlaskit/editor-prosemirror": "4.0.1",
29
- "@atlaskit/emoji": "^67.6.0",
30
- "@atlaskit/prosemirror-input-rules": "^3.1.0",
31
- "@babel/runtime": "^7.0.0",
32
- "@emotion/react": "^11.7.1",
33
- "react-intl-next": "npm:react-intl@^5.18.1"
34
- },
35
- "peerDependencies": {
36
- "react": "^16.8.0"
37
- },
38
- "devDependencies": {
39
- "@af/visual-regression": "*",
40
- "@atlaskit/editor-plugin-composition": "^1.1.0",
41
- "@atlaskit/editor-plugin-decorations": "^1.1.0",
42
- "@atlaskit/ssr": "*",
43
- "@atlaskit/util-data-test": "^17.9.0",
44
- "@atlaskit/visual-regression": "*",
45
- "@testing-library/react": "^12.1.5",
46
- "react-dom": "^16.8.0",
47
- "typescript": "~5.4.2",
48
- "wait-for-expect": "^1.2.0"
49
- },
50
- "techstack": {
51
- "@atlassian/frontend": {
52
- "import-structure": [
53
- "atlassian-conventions"
54
- ],
55
- "circular-dependencies": [
56
- "file-and-folder-level"
57
- ]
58
- },
59
- "@repo/internal": {
60
- "dom-events": "use-bind-event-listener",
61
- "analytics": [
62
- "analytics-next"
63
- ],
64
- "design-tokens": [
65
- "color"
66
- ],
67
- "theming": [
68
- "react-context"
69
- ],
70
- "ui-components": [
71
- "lite-mode"
72
- ],
73
- "deprecation": "no-deprecated-imports",
74
- "styling": [
75
- "emotion",
76
- "emotion"
77
- ],
78
- "imports": [
79
- "import-no-extraneous-disable-for-examples-and-docs"
80
- ]
81
- }
82
- },
83
- "typesVersions": {
84
- ">=4.5 <4.9": {
85
- "*": [
86
- "dist/types-ts4.5/*",
87
- "dist/types-ts4.5/index.d.ts"
88
- ]
89
- }
90
- },
91
- "af:exports": {
92
- ".": "./src/index.ts"
93
- }
94
- }
2
+ "name": "@atlaskit/editor-plugin-emoji",
3
+ "version": "1.4.0",
4
+ "description": "Emoji plugin for @atlaskit/editor-core",
5
+ "publishConfig": {
6
+ "registry": "https://registry.npmjs.org/"
7
+ },
8
+ "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
9
+ "author": "Atlassian Pty Ltd",
10
+ "license": "Apache-2.0",
11
+ "main": "dist/cjs/index.js",
12
+ "module": "dist/esm/index.js",
13
+ "module:es2019": "dist/es2019/index.js",
14
+ "types": "dist/types/index.d.ts",
15
+ "sideEffects": false,
16
+ "atlaskit:src": "src/index.ts",
17
+ "atlassian": {
18
+ "team": "Editor: Media Experience Porygon",
19
+ "releaseModel": "continuous",
20
+ "singleton": true,
21
+ "runReact18": false
22
+ },
23
+ "dependencies": {
24
+ "@atlaskit/adf-schema": "^37.0.0",
25
+ "@atlaskit/editor-common": "^82.12.0",
26
+ "@atlaskit/editor-plugin-analytics": "^1.3.0",
27
+ "@atlaskit/editor-plugin-type-ahead": "^1.3.0",
28
+ "@atlaskit/editor-prosemirror": "4.0.1",
29
+ "@atlaskit/emoji": "^67.6.0",
30
+ "@atlaskit/prosemirror-input-rules": "^3.1.0",
31
+ "@babel/runtime": "^7.0.0",
32
+ "@emotion/react": "^11.7.1",
33
+ "react-intl-next": "npm:react-intl@^5.18.1"
34
+ },
35
+ "peerDependencies": {
36
+ "react": "^16.8.0"
37
+ },
38
+ "devDependencies": {
39
+ "@af/visual-regression": "*",
40
+ "@atlaskit/editor-plugin-composition": "^1.1.0",
41
+ "@atlaskit/editor-plugin-decorations": "^1.1.0",
42
+ "@atlaskit/ssr": "*",
43
+ "@atlaskit/util-data-test": "^17.9.0",
44
+ "@atlaskit/visual-regression": "*",
45
+ "@testing-library/react": "^12.1.5",
46
+ "react-dom": "^16.8.0",
47
+ "typescript": "~5.4.2",
48
+ "wait-for-expect": "^1.2.0"
49
+ },
50
+ "techstack": {
51
+ "@atlassian/frontend": {
52
+ "import-structure": [
53
+ "atlassian-conventions"
54
+ ],
55
+ "circular-dependencies": [
56
+ "file-and-folder-level"
57
+ ]
58
+ },
59
+ "@repo/internal": {
60
+ "dom-events": "use-bind-event-listener",
61
+ "analytics": [
62
+ "analytics-next"
63
+ ],
64
+ "design-tokens": [
65
+ "color"
66
+ ],
67
+ "theming": [
68
+ "react-context"
69
+ ],
70
+ "ui-components": [
71
+ "lite-mode"
72
+ ],
73
+ "deprecation": "no-deprecated-imports",
74
+ "styling": [
75
+ "emotion",
76
+ "emotion"
77
+ ],
78
+ "imports": [
79
+ "import-no-extraneous-disable-for-examples-and-docs"
80
+ ]
81
+ }
82
+ },
83
+ "typesVersions": {
84
+ ">=4.5 <4.9": {
85
+ "*": [
86
+ "dist/types-ts4.5/*",
87
+ "dist/types-ts4.5/index.d.ts"
88
+ ]
89
+ }
90
+ },
91
+ "af:exports": {
92
+ ".": "./src/index.ts"
93
+ }
94
+ }