@atlaskit/editor-plugin-expand 19.0.10 → 20.0.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 +15 -0
- package/dist/cjs/ui/quick-insert/ExpandQuickInsertMenuItem.js +3 -1
- package/dist/cjs/ui/quick-insert/getExpandQuickInsertComponents.js +6 -1
- package/dist/es2019/ui/quick-insert/ExpandQuickInsertMenuItem.js +3 -1
- package/dist/es2019/ui/quick-insert/getExpandQuickInsertComponents.js +6 -1
- package/dist/esm/ui/quick-insert/ExpandQuickInsertMenuItem.js +3 -1
- package/dist/esm/ui/quick-insert/getExpandQuickInsertComponents.js +6 -1
- package/dist/types/ui/quick-insert/ExpandQuickInsertMenuItem.d.ts +3 -1
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-expand
|
|
2
2
|
|
|
3
|
+
## 20.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 19.0.11
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`88fb7a8d4013a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/88fb7a8d4013a) -
|
|
14
|
+
[ux] Add optional light and dark preview URLs to slash-command menu items and pass theme-aware
|
|
15
|
+
previews to supported commands when the `platform_editor_slash_command` experiment is enabled.
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 19.0.10
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -20,7 +20,8 @@ var _commands2 = require("../../singlePlayerExpand/commands");
|
|
|
20
20
|
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); }
|
|
21
21
|
var ExpandQuickInsertMenuItem = exports.ExpandQuickInsertMenuItem = function ExpandQuickInsertMenuItem(_ref) {
|
|
22
22
|
var api = _ref.api,
|
|
23
|
-
isLegacy = _ref.isLegacy
|
|
23
|
+
isLegacy = _ref.isLegacy,
|
|
24
|
+
previewImageUrls = _ref.previewImageUrls;
|
|
24
25
|
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
25
26
|
formatMessage = _useIntl.formatMessage;
|
|
26
27
|
var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(api, ['editorDisabled', 'editorViewMode'], function (states) {
|
|
@@ -63,6 +64,7 @@ var ExpandQuickInsertMenuItem = exports.ExpandQuickInsertMenuItem = function Exp
|
|
|
63
64
|
}),
|
|
64
65
|
isDisabled: editorDisabled || mode === 'view',
|
|
65
66
|
onSelect: onSelect,
|
|
67
|
+
previewImageUrls: previewImageUrls,
|
|
66
68
|
title: formatMessage(_messages.toolbarInsertBlockMessages.expand)
|
|
67
69
|
});
|
|
68
70
|
};
|
|
@@ -14,6 +14,10 @@ var _rank = require("@atlaskit/editor-common/quick-insert/rank");
|
|
|
14
14
|
var _ExpandQuickInsertMenuItem = require("./ExpandQuickInsertMenuItem");
|
|
15
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
|
+
var previewImageUrls = {
|
|
18
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/ltu45641cf615ybs8mr78hme7370ka38.png',
|
|
19
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/gg4nl63re230l87iq0w0wqwas31esm3q.png'
|
|
20
|
+
};
|
|
17
21
|
var getExpandQuickInsertComponents = exports.getExpandQuickInsertComponents = function getExpandQuickInsertComponents(_ref) {
|
|
18
22
|
var api = _ref.api,
|
|
19
23
|
isLegacy = _ref.isLegacy;
|
|
@@ -34,7 +38,8 @@ var getExpandQuickInsertComponents = exports.getExpandQuickInsertComponents = fu
|
|
|
34
38
|
component: function component() {
|
|
35
39
|
return /*#__PURE__*/_react.default.createElement(_ExpandQuickInsertMenuItem.ExpandQuickInsertMenuItem, {
|
|
36
40
|
api: api,
|
|
37
|
-
isLegacy: isLegacy
|
|
41
|
+
isLegacy: isLegacy,
|
|
42
|
+
previewImageUrls: previewImageUrls
|
|
38
43
|
});
|
|
39
44
|
}
|
|
40
45
|
}];
|
|
@@ -11,7 +11,8 @@ import { createExpandNode as createLegacyExpandNode } from '../../legacyExpand/c
|
|
|
11
11
|
import { createExpandNode as createSinglePlayerExpandNode, wrapSelectionAndSetExpandedState } from '../../singlePlayerExpand/commands';
|
|
12
12
|
export const ExpandQuickInsertMenuItem = ({
|
|
13
13
|
api,
|
|
14
|
-
isLegacy
|
|
14
|
+
isLegacy,
|
|
15
|
+
previewImageUrls
|
|
15
16
|
}) => {
|
|
16
17
|
const {
|
|
17
18
|
formatMessage
|
|
@@ -60,6 +61,7 @@ export const ExpandQuickInsertMenuItem = ({
|
|
|
60
61
|
}),
|
|
61
62
|
isDisabled: editorDisabled || mode === 'view',
|
|
62
63
|
onSelect: onSelect,
|
|
64
|
+
previewImageUrls: previewImageUrls,
|
|
63
65
|
title: formatMessage(messages.expand)
|
|
64
66
|
});
|
|
65
67
|
};
|
|
@@ -4,6 +4,10 @@ import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/c
|
|
|
4
4
|
import { EXPAND_MENU_ITEM, STRUCTURE_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
|
|
5
5
|
import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
|
|
6
6
|
import { ExpandQuickInsertMenuItem } from './ExpandQuickInsertMenuItem';
|
|
7
|
+
const previewImageUrls = {
|
|
8
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/ltu45641cf615ybs8mr78hme7370ka38.png',
|
|
9
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/gg4nl63re230l87iq0w0wqwas31esm3q.png'
|
|
10
|
+
};
|
|
7
11
|
export const getExpandQuickInsertComponents = ({
|
|
8
12
|
api,
|
|
9
13
|
isLegacy
|
|
@@ -23,6 +27,7 @@ export const getExpandQuickInsertComponents = ({
|
|
|
23
27
|
})),
|
|
24
28
|
component: () => /*#__PURE__*/React.createElement(ExpandQuickInsertMenuItem, {
|
|
25
29
|
api: api,
|
|
26
|
-
isLegacy: isLegacy
|
|
30
|
+
isLegacy: isLegacy,
|
|
31
|
+
previewImageUrls: previewImageUrls
|
|
27
32
|
})
|
|
28
33
|
}];
|
|
@@ -11,7 +11,8 @@ import { createExpandNode as createLegacyExpandNode } from '../../legacyExpand/c
|
|
|
11
11
|
import { createExpandNode as createSinglePlayerExpandNode, wrapSelectionAndSetExpandedState } from '../../singlePlayerExpand/commands';
|
|
12
12
|
export var ExpandQuickInsertMenuItem = function ExpandQuickInsertMenuItem(_ref) {
|
|
13
13
|
var api = _ref.api,
|
|
14
|
-
isLegacy = _ref.isLegacy
|
|
14
|
+
isLegacy = _ref.isLegacy,
|
|
15
|
+
previewImageUrls = _ref.previewImageUrls;
|
|
15
16
|
var _useIntl = useIntl(),
|
|
16
17
|
formatMessage = _useIntl.formatMessage;
|
|
17
18
|
var _useSharedPluginState = useSharedPluginStateWithSelector(api, ['editorDisabled', 'editorViewMode'], function (states) {
|
|
@@ -54,6 +55,7 @@ export var ExpandQuickInsertMenuItem = function ExpandQuickInsertMenuItem(_ref)
|
|
|
54
55
|
}),
|
|
55
56
|
isDisabled: editorDisabled || mode === 'view',
|
|
56
57
|
onSelect: onSelect,
|
|
58
|
+
previewImageUrls: previewImageUrls,
|
|
57
59
|
title: formatMessage(messages.expand)
|
|
58
60
|
});
|
|
59
61
|
};
|
|
@@ -7,6 +7,10 @@ import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/c
|
|
|
7
7
|
import { EXPAND_MENU_ITEM, STRUCTURE_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
|
|
8
8
|
import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
|
|
9
9
|
import { ExpandQuickInsertMenuItem } from './ExpandQuickInsertMenuItem';
|
|
10
|
+
var previewImageUrls = {
|
|
11
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/ltu45641cf615ybs8mr78hme7370ka38.png',
|
|
12
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/gg4nl63re230l87iq0w0wqwas31esm3q.png'
|
|
13
|
+
};
|
|
10
14
|
export var getExpandQuickInsertComponents = function getExpandQuickInsertComponents(_ref) {
|
|
11
15
|
var api = _ref.api,
|
|
12
16
|
isLegacy = _ref.isLegacy;
|
|
@@ -27,7 +31,8 @@ export var getExpandQuickInsertComponents = function getExpandQuickInsertCompone
|
|
|
27
31
|
component: function component() {
|
|
28
32
|
return /*#__PURE__*/React.createElement(ExpandQuickInsertMenuItem, {
|
|
29
33
|
api: api,
|
|
30
|
-
isLegacy: isLegacy
|
|
34
|
+
isLegacy: isLegacy,
|
|
35
|
+
previewImageUrls: previewImageUrls
|
|
31
36
|
});
|
|
32
37
|
}
|
|
33
38
|
}];
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type QuickInsertMenuItemProps } from '@atlaskit/editor-common/quick-insert/menu-item';
|
|
2
3
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
4
|
import type { ExpandPlugin } from '../../types';
|
|
4
5
|
type Props = {
|
|
5
6
|
api: ExtractInjectionAPI<ExpandPlugin> | undefined;
|
|
6
7
|
isLegacy: boolean;
|
|
8
|
+
previewImageUrls?: QuickInsertMenuItemProps['previewImageUrls'];
|
|
7
9
|
};
|
|
8
|
-
export declare const ExpandQuickInsertMenuItem: ({ api, isLegacy }: Props) => React.JSX.Element;
|
|
10
|
+
export declare const ExpandQuickInsertMenuItem: ({ api, isLegacy, previewImageUrls, }: Props) => React.JSX.Element;
|
|
9
11
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-expand",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.0",
|
|
4
4
|
"description": "Expand plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -23,17 +23,17 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@atlaskit/adf-schema": "^57.5.0",
|
|
25
25
|
"@atlaskit/button": "^25.3.0",
|
|
26
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
27
|
-
"@atlaskit/editor-plugin-block-controls": "^
|
|
28
|
-
"@atlaskit/editor-plugin-block-menu": "^
|
|
29
|
-
"@atlaskit/editor-plugin-decorations": "^
|
|
30
|
-
"@atlaskit/editor-plugin-editor-disabled": "^
|
|
31
|
-
"@atlaskit/editor-plugin-editor-viewmode": "^
|
|
32
|
-
"@atlaskit/editor-plugin-limited-mode": "^
|
|
33
|
-
"@atlaskit/editor-plugin-local-id": "^
|
|
34
|
-
"@atlaskit/editor-plugin-selection": "^
|
|
35
|
-
"@atlaskit/editor-plugin-selection-marker": "^
|
|
36
|
-
"@atlaskit/editor-prosemirror": "^
|
|
26
|
+
"@atlaskit/editor-plugin-analytics": "^19.0.0",
|
|
27
|
+
"@atlaskit/editor-plugin-block-controls": "^20.0.0",
|
|
28
|
+
"@atlaskit/editor-plugin-block-menu": "^18.0.0",
|
|
29
|
+
"@atlaskit/editor-plugin-decorations": "^19.0.0",
|
|
30
|
+
"@atlaskit/editor-plugin-editor-disabled": "^19.0.0",
|
|
31
|
+
"@atlaskit/editor-plugin-editor-viewmode": "^21.0.0",
|
|
32
|
+
"@atlaskit/editor-plugin-limited-mode": "^16.0.0",
|
|
33
|
+
"@atlaskit/editor-plugin-local-id": "^17.0.0",
|
|
34
|
+
"@atlaskit/editor-plugin-selection": "^19.0.0",
|
|
35
|
+
"@atlaskit/editor-plugin-selection-marker": "^19.0.0",
|
|
36
|
+
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
37
37
|
"@atlaskit/editor-shared-styles": "^4.3.0",
|
|
38
38
|
"@atlaskit/editor-tables": "^3.2.0",
|
|
39
39
|
"@atlaskit/editor-toolbar": "^2.6.0",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
45
45
|
"@atlaskit/prosemirror-history": "^1.2.0",
|
|
46
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
47
|
-
"@atlaskit/tokens": "^
|
|
46
|
+
"@atlaskit/tmp-editor-statsig": "^199.0.0",
|
|
47
|
+
"@atlaskit/tokens": "^18.2.0",
|
|
48
48
|
"@atlaskit/tooltip": "^24.3.0",
|
|
49
49
|
"@babel/runtime": "^7.0.0",
|
|
50
50
|
"@emotion/react": "^11.7.1",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"w3c-keyname": "^2.1.8"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"@atlaskit/editor-common": "^
|
|
55
|
+
"@atlaskit/editor-common": "^123.0.0",
|
|
56
56
|
"react": "^18.2.0 || ^19.2.0",
|
|
57
57
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
58
58
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|