@atlaskit/editor-plugin-synced-block 16.0.12 → 16.0.14
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/SyncedBlockQuickInsertMenuItem.js +2 -0
- package/dist/cjs/ui/quick-insert/getSyncedBlockQuickInsertComponents.js +5 -0
- package/dist/es2019/ui/quick-insert/SyncedBlockQuickInsertMenuItem.js +2 -0
- package/dist/es2019/ui/quick-insert/getSyncedBlockQuickInsertComponents.js +5 -0
- package/dist/esm/ui/quick-insert/SyncedBlockQuickInsertMenuItem.js +2 -0
- package/dist/esm/ui/quick-insert/getSyncedBlockQuickInsertComponents.js +5 -0
- package/dist/types/ui/quick-insert/SyncedBlockQuickInsertMenuItem.d.ts +3 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-synced-block
|
|
2
2
|
|
|
3
|
+
## 16.0.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`88fb7a8d4013a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/88fb7a8d4013a) -
|
|
8
|
+
[ux] Add optional light and dark preview URLs to slash-command menu items and pass theme-aware
|
|
9
|
+
previews to supported commands when the `platform_editor_slash_command` experiment is enabled.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 16.0.13
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 16.0.12
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -17,6 +17,7 @@ var _editorCommands = require("../../editor-commands");
|
|
|
17
17
|
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); }
|
|
18
18
|
var SyncedBlockQuickInsertMenuItem = exports.SyncedBlockQuickInsertMenuItem = function SyncedBlockQuickInsertMenuItem(_ref) {
|
|
19
19
|
var api = _ref.api,
|
|
20
|
+
previewImageUrls = _ref.previewImageUrls,
|
|
20
21
|
syncBlockStore = _ref.syncBlockStore;
|
|
21
22
|
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
22
23
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -46,6 +47,7 @@ var SyncedBlockQuickInsertMenuItem = exports.SyncedBlockQuickInsertMenuItem = fu
|
|
|
46
47
|
}),
|
|
47
48
|
isDisabled: editorDisabled,
|
|
48
49
|
onSelect: onSelect,
|
|
50
|
+
previewImageUrls: previewImageUrls,
|
|
49
51
|
title: formatMessage(_messages.blockTypeMessages.syncedBlockQuickInsertTitle)
|
|
50
52
|
});
|
|
51
53
|
};
|
|
@@ -11,6 +11,10 @@ var _createQuickInsertMatcher = require("@atlaskit/editor-common/quick-insert/cr
|
|
|
11
11
|
var _keys = require("@atlaskit/editor-common/quick-insert/keys");
|
|
12
12
|
var _rank = require("@atlaskit/editor-common/quick-insert/rank");
|
|
13
13
|
var _SyncedBlockQuickInsertMenuItem = require("./SyncedBlockQuickInsertMenuItem");
|
|
14
|
+
var previewImageUrls = {
|
|
15
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/3xy4v4e4736r7nghty67s6wxw08opr7p.png',
|
|
16
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/n185dd3113dx4146baa3dm3427woq1d6.png'
|
|
17
|
+
};
|
|
14
18
|
var getSyncedBlockQuickInsertComponents = exports.getSyncedBlockQuickInsertComponents = function getSyncedBlockQuickInsertComponents(_ref) {
|
|
15
19
|
var api = _ref.api,
|
|
16
20
|
syncBlockStore = _ref.syncBlockStore;
|
|
@@ -34,6 +38,7 @@ var getSyncedBlockQuickInsertComponents = exports.getSyncedBlockQuickInsertCompo
|
|
|
34
38
|
component: function component() {
|
|
35
39
|
return /*#__PURE__*/_react.default.createElement(_SyncedBlockQuickInsertMenuItem.SyncedBlockQuickInsertMenuItem, {
|
|
36
40
|
api: api,
|
|
41
|
+
previewImageUrls: previewImageUrls,
|
|
37
42
|
syncBlockStore: syncBlockStore
|
|
38
43
|
});
|
|
39
44
|
}
|
|
@@ -8,6 +8,7 @@ import BlockSyncedIcon from '@atlaskit/icon-lab/core/block-synced';
|
|
|
8
8
|
import { createSyncedBlock } from '../../editor-commands';
|
|
9
9
|
export const SyncedBlockQuickInsertMenuItem = ({
|
|
10
10
|
api,
|
|
11
|
+
previewImageUrls,
|
|
11
12
|
syncBlockStore
|
|
12
13
|
}) => {
|
|
13
14
|
const {
|
|
@@ -41,6 +42,7 @@ export const SyncedBlockQuickInsertMenuItem = ({
|
|
|
41
42
|
}),
|
|
42
43
|
isDisabled: editorDisabled,
|
|
43
44
|
onSelect: onSelect,
|
|
45
|
+
previewImageUrls: previewImageUrls,
|
|
44
46
|
title: formatMessage(blockTypeMessages.syncedBlockQuickInsertTitle)
|
|
45
47
|
});
|
|
46
48
|
};
|
|
@@ -4,6 +4,10 @@ import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/c
|
|
|
4
4
|
import { STRUCTURE_SECTION, SYNCED_BLOCK_MENU_ITEM } from '@atlaskit/editor-common/quick-insert/keys';
|
|
5
5
|
import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
|
|
6
6
|
import { SyncedBlockQuickInsertMenuItem } from './SyncedBlockQuickInsertMenuItem';
|
|
7
|
+
const previewImageUrls = {
|
|
8
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/3xy4v4e4736r7nghty67s6wxw08opr7p.png',
|
|
9
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/n185dd3113dx4146baa3dm3427woq1d6.png'
|
|
10
|
+
};
|
|
7
11
|
export const getSyncedBlockQuickInsertComponents = ({
|
|
8
12
|
api,
|
|
9
13
|
syncBlockStore
|
|
@@ -25,6 +29,7 @@ export const getSyncedBlockQuickInsertComponents = ({
|
|
|
25
29
|
})),
|
|
26
30
|
component: () => /*#__PURE__*/React.createElement(SyncedBlockQuickInsertMenuItem, {
|
|
27
31
|
api: api,
|
|
32
|
+
previewImageUrls: previewImageUrls,
|
|
28
33
|
syncBlockStore: syncBlockStore
|
|
29
34
|
})
|
|
30
35
|
}];
|
|
@@ -8,6 +8,7 @@ import BlockSyncedIcon from '@atlaskit/icon-lab/core/block-synced';
|
|
|
8
8
|
import { createSyncedBlock } from '../../editor-commands';
|
|
9
9
|
export var SyncedBlockQuickInsertMenuItem = function SyncedBlockQuickInsertMenuItem(_ref) {
|
|
10
10
|
var api = _ref.api,
|
|
11
|
+
previewImageUrls = _ref.previewImageUrls,
|
|
11
12
|
syncBlockStore = _ref.syncBlockStore;
|
|
12
13
|
var _useIntl = useIntl(),
|
|
13
14
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -37,6 +38,7 @@ export var SyncedBlockQuickInsertMenuItem = function SyncedBlockQuickInsertMenuI
|
|
|
37
38
|
}),
|
|
38
39
|
isDisabled: editorDisabled,
|
|
39
40
|
onSelect: onSelect,
|
|
41
|
+
previewImageUrls: previewImageUrls,
|
|
40
42
|
title: formatMessage(blockTypeMessages.syncedBlockQuickInsertTitle)
|
|
41
43
|
});
|
|
42
44
|
};
|
|
@@ -4,6 +4,10 @@ import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/c
|
|
|
4
4
|
import { STRUCTURE_SECTION, SYNCED_BLOCK_MENU_ITEM } from '@atlaskit/editor-common/quick-insert/keys';
|
|
5
5
|
import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
|
|
6
6
|
import { SyncedBlockQuickInsertMenuItem } from './SyncedBlockQuickInsertMenuItem';
|
|
7
|
+
var previewImageUrls = {
|
|
8
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/3xy4v4e4736r7nghty67s6wxw08opr7p.png',
|
|
9
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/n185dd3113dx4146baa3dm3427woq1d6.png'
|
|
10
|
+
};
|
|
7
11
|
export var getSyncedBlockQuickInsertComponents = function getSyncedBlockQuickInsertComponents(_ref) {
|
|
8
12
|
var api = _ref.api,
|
|
9
13
|
syncBlockStore = _ref.syncBlockStore;
|
|
@@ -27,6 +31,7 @@ export var getSyncedBlockQuickInsertComponents = function getSyncedBlockQuickIns
|
|
|
27
31
|
component: function component() {
|
|
28
32
|
return /*#__PURE__*/React.createElement(SyncedBlockQuickInsertMenuItem, {
|
|
29
33
|
api: api,
|
|
34
|
+
previewImageUrls: previewImageUrls,
|
|
30
35
|
syncBlockStore: syncBlockStore
|
|
31
36
|
});
|
|
32
37
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
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 { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
|
|
4
5
|
import type { SyncedBlockPlugin } from '../../syncedBlockPluginType';
|
|
5
|
-
export declare const SyncedBlockQuickInsertMenuItem: ({ api, syncBlockStore, }: {
|
|
6
|
+
export declare const SyncedBlockQuickInsertMenuItem: ({ api, previewImageUrls, syncBlockStore, }: {
|
|
6
7
|
api: ExtractInjectionAPI<SyncedBlockPlugin> | undefined;
|
|
8
|
+
previewImageUrls?: QuickInsertMenuItemProps['previewImageUrls'];
|
|
7
9
|
syncBlockStore: SyncBlockStoreManager;
|
|
8
10
|
}) => React.JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-synced-block",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.14",
|
|
4
4
|
"description": "SyncedBlock plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"atlaskit:src": "src/index.ts",
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@atlaskit/adf-schema": "^57.5.0",
|
|
24
|
-
"@atlaskit/button": "25.3.
|
|
25
|
-
"@atlaskit/dropdown-menu": "18.3.
|
|
24
|
+
"@atlaskit/button": "25.3.5",
|
|
25
|
+
"@atlaskit/dropdown-menu": "18.3.3",
|
|
26
26
|
"@atlaskit/editor-json-transformer": "^9.8.0",
|
|
27
27
|
"@atlaskit/editor-plugin-analytics": "^18.0.0",
|
|
28
28
|
"@atlaskit/editor-plugin-block-controls": "^19.0.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@atlaskit/editor-synced-block-provider": "^14.0.0",
|
|
45
45
|
"@atlaskit/editor-toolbar": "^2.6.0",
|
|
46
46
|
"@atlaskit/flag": "^18.5.0",
|
|
47
|
-
"@atlaskit/icon": "37.7.
|
|
47
|
+
"@atlaskit/icon": "37.7.2",
|
|
48
48
|
"@atlaskit/icon-lab": "^7.9.0",
|
|
49
49
|
"@atlaskit/logo": "^23.0.0",
|
|
50
50
|
"@atlaskit/lozenge": "^15.4.0",
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
53
53
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
54
54
|
"@atlaskit/primitives": "^22.5.0",
|
|
55
|
-
"@atlaskit/spinner": "20.4.
|
|
56
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
57
|
-
"@atlaskit/tokens": "
|
|
55
|
+
"@atlaskit/spinner": "20.4.2",
|
|
56
|
+
"@atlaskit/tmp-editor-statsig": "^199.0.0",
|
|
57
|
+
"@atlaskit/tokens": "18.0.0",
|
|
58
58
|
"@atlaskit/tooltip": "^24.3.0",
|
|
59
59
|
"@atlaskit/visually-hidden": "^4.4.0",
|
|
60
60
|
"@babel/runtime": "^7.0.0",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"memoize-one": "^6.0.0"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
|
-
"@atlaskit/editor-common": "^122.
|
|
68
|
+
"@atlaskit/editor-common": "^122.11.0",
|
|
69
69
|
"react": "^18.2.0 || ^19.2.0",
|
|
70
70
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
71
71
|
},
|