@atlaskit/editor-plugin-hyperlink 16.0.3 → 16.0.5

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,21 @@
1
1
  # @atlaskit/editor-plugin-hyperlink
2
2
 
3
+ ## 16.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`3a4c286fdb8c1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3a4c286fdb8c1) -
8
+ Add registry-backed Quick Insert search matching under the existing
9
+ `platform_editor_slash_command` experiment. Make native, provider, and extension registered Quick
10
+ Insert items searchable.
11
+ - Updated dependencies
12
+
13
+ ## 16.0.4
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
3
19
  ## 16.0.3
4
20
 
5
21
  ### Patch Changes
@@ -6,6 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.getHyperlinkQuickInsertComponents = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
+ var _keymaps = require("@atlaskit/editor-common/keymaps");
10
+ var _messages = require("@atlaskit/editor-common/messages");
11
+ var _createQuickInsertMatcher = require("@atlaskit/editor-common/quick-insert/create-quick-insert-matcher");
9
12
  var _keys = require("@atlaskit/editor-common/quick-insert/keys");
10
13
  var _rank = require("@atlaskit/editor-common/quick-insert/rank");
11
14
  var _HyperlinkQuickInsertMenuItem = require("./HyperlinkQuickInsertMenuItem");
@@ -19,6 +22,15 @@ var getHyperlinkQuickInsertComponents = exports.getHyperlinkQuickInsertComponent
19
22
  type: _keys.MEDIA_SECTION.type,
20
23
  rank: _rank.MEDIA_SECTION_RANK[_keys.HYPERLINK_MENU_ITEM.key]
21
24
  }],
25
+ match: (0, _createQuickInsertMatcher.createQuickInsertMatcher)(function (_ref2) {
26
+ var formatMessage = _ref2.formatMessage;
27
+ return {
28
+ description: formatMessage(_messages.toolbarInsertBlockMessages.linkDescription),
29
+ keywords: ['hyperlink', 'url'],
30
+ shortcut: (0, _keymaps.tooltip)(_keymaps.addLink),
31
+ title: formatMessage(_messages.toolbarInsertBlockMessages.link)
32
+ };
33
+ }),
22
34
  component: function component() {
23
35
  return /*#__PURE__*/_react.default.createElement(_HyperlinkQuickInsertMenuItem.HyperlinkQuickInsertMenuItem, {
24
36
  api: api
@@ -1,4 +1,7 @@
1
1
  import React from 'react';
2
+ import { addLink, tooltip } from '@atlaskit/editor-common/keymaps';
3
+ import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
4
+ import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher';
2
5
  import { HYPERLINK_MENU_ITEM, MEDIA_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
3
6
  import { MEDIA_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
4
7
  import { HyperlinkQuickInsertMenuItem } from './HyperlinkQuickInsertMenuItem';
@@ -12,6 +15,14 @@ export const getHyperlinkQuickInsertComponents = ({
12
15
  type: MEDIA_SECTION.type,
13
16
  rank: MEDIA_SECTION_RANK[HYPERLINK_MENU_ITEM.key]
14
17
  }],
18
+ match: createQuickInsertMatcher(({
19
+ formatMessage
20
+ }) => ({
21
+ description: formatMessage(messages.linkDescription),
22
+ keywords: ['hyperlink', 'url'],
23
+ shortcut: tooltip(addLink),
24
+ title: formatMessage(messages.link)
25
+ })),
15
26
  component: () => /*#__PURE__*/React.createElement(HyperlinkQuickInsertMenuItem, {
16
27
  api: api
17
28
  })
@@ -1,4 +1,7 @@
1
1
  import React from 'react';
2
+ import { addLink, tooltip } from '@atlaskit/editor-common/keymaps';
3
+ import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
4
+ import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher';
2
5
  import { HYPERLINK_MENU_ITEM, MEDIA_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
3
6
  import { MEDIA_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
4
7
  import { HyperlinkQuickInsertMenuItem } from './HyperlinkQuickInsertMenuItem';
@@ -12,6 +15,15 @@ export var getHyperlinkQuickInsertComponents = function getHyperlinkQuickInsertC
12
15
  type: MEDIA_SECTION.type,
13
16
  rank: MEDIA_SECTION_RANK[HYPERLINK_MENU_ITEM.key]
14
17
  }],
18
+ match: createQuickInsertMatcher(function (_ref2) {
19
+ var formatMessage = _ref2.formatMessage;
20
+ return {
21
+ description: formatMessage(messages.linkDescription),
22
+ keywords: ['hyperlink', 'url'],
23
+ shortcut: tooltip(addLink),
24
+ title: formatMessage(messages.link)
25
+ };
26
+ }),
15
27
  component: function component() {
16
28
  return /*#__PURE__*/React.createElement(HyperlinkQuickInsertMenuItem, {
17
29
  api: api
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-hyperlink",
3
- "version": "16.0.3",
3
+ "version": "16.0.5",
4
4
  "description": "Hyperlink plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -21,7 +21,7 @@
21
21
  ],
22
22
  "atlaskit:src": "src/index.ts",
23
23
  "dependencies": {
24
- "@atlaskit/adf-schema": "^56.6.0",
24
+ "@atlaskit/adf-schema": "^56.7.0",
25
25
  "@atlaskit/analytics-next": "^12.3.0",
26
26
  "@atlaskit/editor-plugin-analytics": "^14.0.0",
27
27
  "@atlaskit/editor-plugin-card": "^20.0.0",
@@ -30,23 +30,23 @@
30
30
  "@atlaskit/editor-plugin-primary-toolbar": "^15.0.0",
31
31
  "@atlaskit/editor-plugin-selection-toolbar": "^15.0.0",
32
32
  "@atlaskit/editor-plugin-toolbar": "^11.0.0",
33
- "@atlaskit/editor-plugin-ui-control-registry": "^8.0.0",
33
+ "@atlaskit/editor-plugin-ui-control-registry": "^8.1.0",
34
34
  "@atlaskit/editor-plugin-user-intent": "^12.0.0",
35
35
  "@atlaskit/editor-prosemirror": "^8.0.0",
36
36
  "@atlaskit/editor-toolbar": "^2.4.0",
37
37
  "@atlaskit/editor-toolbar-model": "^1.2.0",
38
- "@atlaskit/editor-ui-control-model": "^2.4.0",
38
+ "@atlaskit/editor-ui-control-model": "^2.6.0",
39
39
  "@atlaskit/icon": "^37.3.0",
40
40
  "@atlaskit/platform-feature-experiments": "^0.3.0",
41
41
  "@atlaskit/platform-feature-flags": "^2.1.0",
42
42
  "@atlaskit/prosemirror-input-rules": "^4.0.0",
43
- "@atlaskit/tmp-editor-statsig": "^145.0.0",
43
+ "@atlaskit/tmp-editor-statsig": "^146.0.0",
44
44
  "@babel/runtime": "^7.0.0",
45
45
  "@emotion/react": "^11.7.1",
46
46
  "uuid": "^3.1.0"
47
47
  },
48
48
  "peerDependencies": {
49
- "@atlaskit/editor-common": "^118.2.0",
49
+ "@atlaskit/editor-common": "^118.10.0",
50
50
  "react": "^18.2.0 || ^19.2.0",
51
51
  "react-dom": "^18.2.0 || ^19.2.0",
52
52
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"