@atlaskit/editor-plugin-loom 15.0.1 → 16.0.1
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 +16 -0
- package/dist/cjs/ui/quick-insert/LoomQuickInsertMenuItem.js +6 -12
- package/dist/cjs/ui/quick-insert/getLoomQuickInsertComponents.js +10 -0
- package/dist/es2019/ui/quick-insert/LoomQuickInsertMenuItem.js +2 -7
- package/dist/es2019/ui/quick-insert/getLoomQuickInsertComponents.js +9 -0
- package/dist/esm/ui/quick-insert/LoomQuickInsertMenuItem.js +6 -12
- package/dist/esm/ui/quick-insert/getLoomQuickInsertComponents.js +10 -0
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-loom
|
|
2
2
|
|
|
3
|
+
## 16.0.1
|
|
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.0
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 15.0.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -9,11 +9,10 @@ exports.LoomQuickInsertMenuItem = void 0;
|
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _reactIntl = require("react-intl");
|
|
11
11
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
12
|
-
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
13
12
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
14
13
|
var _monitoring = require("@atlaskit/editor-common/monitoring");
|
|
15
14
|
var _menuItem = require("@atlaskit/editor-common/quick-insert/menu-item");
|
|
16
|
-
var
|
|
15
|
+
var _useQuickInsertContext = require("@atlaskit/editor-common/quick-insert/use-quick-insert-context");
|
|
17
16
|
var _video = _interopRequireDefault(require("@atlaskit/icon/core/video"));
|
|
18
17
|
var _commands = require("../../pm-plugins/commands");
|
|
19
18
|
var _main = require("../../pm-plugins/main");
|
|
@@ -22,17 +21,12 @@ var LoomQuickInsertMenuItem = exports.LoomQuickInsertMenuItem = function LoomQui
|
|
|
22
21
|
var api = _ref.api;
|
|
23
22
|
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
24
23
|
formatMessage = _useIntl.formatMessage;
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
isOffline: (0, _connectivityPluginType.isOfflineMode)(connectivityState === null || connectivityState === void 0 ? void 0 : connectivityState.mode)
|
|
29
|
-
};
|
|
30
|
-
}),
|
|
31
|
-
isOffline = _useSharedPluginState.isOffline;
|
|
32
|
-
var onSelect = (0, _react.useCallback)(function (_ref3) {
|
|
24
|
+
var _useQuickInsertContex = (0, _useQuickInsertContext.useQuickInsertContext)(),
|
|
25
|
+
isOffline = _useQuickInsertContex.isOffline;
|
|
26
|
+
var onSelect = (0, _react.useCallback)(function (_ref2) {
|
|
33
27
|
var _recordVideo, _api$analytics2;
|
|
34
|
-
var editorView =
|
|
35
|
-
insert =
|
|
28
|
+
var editorView = _ref2.editorView,
|
|
29
|
+
insert = _ref2.insert;
|
|
36
30
|
var tr = insert(undefined);
|
|
37
31
|
var loomState = _main.loomPluginKey.getState(editorView.state);
|
|
38
32
|
if (!(loomState !== null && loomState !== void 0 && loomState.isEnabled)) {
|
|
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.getLoomQuickInsertComponents = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _messages = require("@atlaskit/editor-common/messages");
|
|
10
|
+
var _createQuickInsertMatcher = require("@atlaskit/editor-common/quick-insert/create-quick-insert-matcher");
|
|
9
11
|
var _keys = require("@atlaskit/editor-common/quick-insert/keys");
|
|
10
12
|
var _rank = require("@atlaskit/editor-common/quick-insert/rank");
|
|
11
13
|
var _LoomQuickInsertMenuItem = require("./LoomQuickInsertMenuItem");
|
|
@@ -19,6 +21,14 @@ var getLoomQuickInsertComponents = exports.getLoomQuickInsertComponents = functi
|
|
|
19
21
|
type: _keys.MEDIA_SECTION.type,
|
|
20
22
|
rank: _rank.MEDIA_SECTION_RANK[_keys.LOOM_MENU_ITEM.key]
|
|
21
23
|
}],
|
|
24
|
+
match: (0, _createQuickInsertMatcher.createQuickInsertMatcher)(function (_ref2) {
|
|
25
|
+
var formatMessage = _ref2.formatMessage;
|
|
26
|
+
return {
|
|
27
|
+
description: formatMessage(_messages.toolbarInsertBlockMessages.recordVideoDescription),
|
|
28
|
+
keywords: ['loom', 'record', 'video'],
|
|
29
|
+
title: formatMessage(_messages.toolbarInsertBlockMessages.recordVideo)
|
|
30
|
+
};
|
|
31
|
+
}),
|
|
22
32
|
component: function component() {
|
|
23
33
|
return /*#__PURE__*/_react.default.createElement(_LoomQuickInsertMenuItem.LoomQuickInsertMenuItem, {
|
|
24
34
|
api: api
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
3
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
5
4
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
6
5
|
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
7
6
|
import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-item';
|
|
8
|
-
import {
|
|
7
|
+
import { useQuickInsertContext } from '@atlaskit/editor-common/quick-insert/use-quick-insert-context';
|
|
9
8
|
import VideoIcon from '@atlaskit/icon/core/video';
|
|
10
9
|
import { recordVideo, recordVideoFailed } from '../../pm-plugins/commands';
|
|
11
10
|
import { loomPluginKey } from '../../pm-plugins/main';
|
|
@@ -17,11 +16,7 @@ export const LoomQuickInsertMenuItem = ({
|
|
|
17
16
|
} = useIntl();
|
|
18
17
|
const {
|
|
19
18
|
isOffline
|
|
20
|
-
} =
|
|
21
|
-
connectivityState
|
|
22
|
-
}) => ({
|
|
23
|
-
isOffline: isOfflineMode(connectivityState === null || connectivityState === void 0 ? void 0 : connectivityState.mode)
|
|
24
|
-
}));
|
|
19
|
+
} = useQuickInsertContext();
|
|
25
20
|
const onSelect = useCallback(({
|
|
26
21
|
editorView,
|
|
27
22
|
insert
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
3
|
+
import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher';
|
|
2
4
|
import { LOOM_MENU_ITEM, MEDIA_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
|
|
3
5
|
import { MEDIA_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
|
|
4
6
|
import { LoomQuickInsertMenuItem } from './LoomQuickInsertMenuItem';
|
|
@@ -12,6 +14,13 @@ export const getLoomQuickInsertComponents = ({
|
|
|
12
14
|
type: MEDIA_SECTION.type,
|
|
13
15
|
rank: MEDIA_SECTION_RANK[LOOM_MENU_ITEM.key]
|
|
14
16
|
}],
|
|
17
|
+
match: createQuickInsertMatcher(({
|
|
18
|
+
formatMessage
|
|
19
|
+
}) => ({
|
|
20
|
+
description: formatMessage(messages.recordVideoDescription),
|
|
21
|
+
keywords: ['loom', 'record', 'video'],
|
|
22
|
+
title: formatMessage(messages.recordVideo)
|
|
23
|
+
})),
|
|
15
24
|
component: () => /*#__PURE__*/React.createElement(LoomQuickInsertMenuItem, {
|
|
16
25
|
api: api
|
|
17
26
|
})
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
3
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
5
4
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
6
5
|
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
7
6
|
import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-item';
|
|
8
|
-
import {
|
|
7
|
+
import { useQuickInsertContext } from '@atlaskit/editor-common/quick-insert/use-quick-insert-context';
|
|
9
8
|
import VideoIcon from '@atlaskit/icon/core/video';
|
|
10
9
|
import { recordVideo, recordVideoFailed } from '../../pm-plugins/commands';
|
|
11
10
|
import { loomPluginKey } from '../../pm-plugins/main';
|
|
@@ -13,17 +12,12 @@ export var LoomQuickInsertMenuItem = function LoomQuickInsertMenuItem(_ref) {
|
|
|
13
12
|
var api = _ref.api;
|
|
14
13
|
var _useIntl = useIntl(),
|
|
15
14
|
formatMessage = _useIntl.formatMessage;
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
isOffline: isOfflineMode(connectivityState === null || connectivityState === void 0 ? void 0 : connectivityState.mode)
|
|
20
|
-
};
|
|
21
|
-
}),
|
|
22
|
-
isOffline = _useSharedPluginState.isOffline;
|
|
23
|
-
var onSelect = useCallback(function (_ref3) {
|
|
15
|
+
var _useQuickInsertContex = useQuickInsertContext(),
|
|
16
|
+
isOffline = _useQuickInsertContex.isOffline;
|
|
17
|
+
var onSelect = useCallback(function (_ref2) {
|
|
24
18
|
var _recordVideo, _api$analytics2;
|
|
25
|
-
var editorView =
|
|
26
|
-
insert =
|
|
19
|
+
var editorView = _ref2.editorView,
|
|
20
|
+
insert = _ref2.insert;
|
|
27
21
|
var tr = insert(undefined);
|
|
28
22
|
var loomState = loomPluginKey.getState(editorView.state);
|
|
29
23
|
if (!(loomState !== null && loomState !== void 0 && loomState.isEnabled)) {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
3
|
+
import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher';
|
|
2
4
|
import { LOOM_MENU_ITEM, MEDIA_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
|
|
3
5
|
import { MEDIA_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
|
|
4
6
|
import { LoomQuickInsertMenuItem } from './LoomQuickInsertMenuItem';
|
|
@@ -12,6 +14,14 @@ export var getLoomQuickInsertComponents = function getLoomQuickInsertComponents(
|
|
|
12
14
|
type: MEDIA_SECTION.type,
|
|
13
15
|
rank: MEDIA_SECTION_RANK[LOOM_MENU_ITEM.key]
|
|
14
16
|
}],
|
|
17
|
+
match: createQuickInsertMatcher(function (_ref2) {
|
|
18
|
+
var formatMessage = _ref2.formatMessage;
|
|
19
|
+
return {
|
|
20
|
+
description: formatMessage(messages.recordVideoDescription),
|
|
21
|
+
keywords: ['loom', 'record', 'video'],
|
|
22
|
+
title: formatMessage(messages.recordVideo)
|
|
23
|
+
};
|
|
24
|
+
}),
|
|
15
25
|
component: function component() {
|
|
16
26
|
return /*#__PURE__*/React.createElement(LoomQuickInsertMenuItem, {
|
|
17
27
|
api: api
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-loom",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "16.0.1",
|
|
4
4
|
"description": "Loom plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -25,28 +25,28 @@
|
|
|
25
25
|
"atlaskit:src": "src/index.ts",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@atlaskit/button": "^25.0.0",
|
|
28
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
29
|
-
"@atlaskit/editor-plugin-connectivity": "^
|
|
30
|
-
"@atlaskit/editor-plugin-editor-viewmode": "^
|
|
31
|
-
"@atlaskit/editor-plugin-hyperlink": "^
|
|
32
|
-
"@atlaskit/editor-plugin-primary-toolbar": "^
|
|
33
|
-
"@atlaskit/editor-plugin-quick-insert": "^
|
|
34
|
-
"@atlaskit/editor-plugin-toolbar": "^
|
|
35
|
-
"@atlaskit/editor-plugin-ui-control-registry": "^
|
|
36
|
-
"@atlaskit/editor-plugin-width": "^
|
|
28
|
+
"@atlaskit/editor-plugin-analytics": "^14.0.0",
|
|
29
|
+
"@atlaskit/editor-plugin-connectivity": "^14.0.0",
|
|
30
|
+
"@atlaskit/editor-plugin-editor-viewmode": "^16.0.0",
|
|
31
|
+
"@atlaskit/editor-plugin-hyperlink": "^16.0.0",
|
|
32
|
+
"@atlaskit/editor-plugin-primary-toolbar": "^15.0.0",
|
|
33
|
+
"@atlaskit/editor-plugin-quick-insert": "^14.1.0",
|
|
34
|
+
"@atlaskit/editor-plugin-toolbar": "^11.0.0",
|
|
35
|
+
"@atlaskit/editor-plugin-ui-control-registry": "^8.1.0",
|
|
36
|
+
"@atlaskit/editor-plugin-width": "^15.0.0",
|
|
37
37
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
38
38
|
"@atlaskit/editor-toolbar": "^2.4.0",
|
|
39
|
-
"@atlaskit/editor-ui-control-model": "^2.
|
|
39
|
+
"@atlaskit/editor-ui-control-model": "^2.6.0",
|
|
40
40
|
"@atlaskit/icon": "^37.3.0",
|
|
41
41
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
42
42
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
43
|
-
"@atlaskit/tokens": "^16.
|
|
43
|
+
"@atlaskit/tokens": "^16.6.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|
|
45
45
|
"@emotion/react": "^11.7.1",
|
|
46
46
|
"@loomhq/record-sdk": "^4.12.4"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@atlaskit/editor-common": "^
|
|
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"
|