@atlaskit/native-embeds-common 2.5.6 → 2.6.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,13 @@
|
|
|
1
1
|
# @atlaskit/native-embeds-common
|
|
2
2
|
|
|
3
|
+
## 2.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`72c0d47a53488`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/72c0d47a53488) -
|
|
8
|
+
Add native-embed comments support, including a reusable Comment toolbar action and omitting
|
|
9
|
+
annotations from copied embeds.
|
|
10
|
+
|
|
3
11
|
## 2.5.6
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -57,7 +57,7 @@ var NATIVE_EMBED_PARAMETER_DEFAULTS = exports.NATIVE_EMBED_PARAMETER_DEFAULTS =
|
|
|
57
57
|
/**
|
|
58
58
|
* Built-in keys that can be referenced in the `items` and `moreItems` arrays.
|
|
59
59
|
*
|
|
60
|
-
* Toolbar keys: ASK_ROVO, SUMMARISE, REFRESH, EDIT, EMBED, BORDER, ALIGNMENT, OPEN_IN_NEW_WINDOW
|
|
60
|
+
* Toolbar keys: ASK_ROVO, SUMMARISE, REFRESH, EDIT, COMMENT, EMBED, BORDER, ALIGNMENT, OPEN_IN_NEW_WINDOW
|
|
61
61
|
* More Options dropdown keys: ALWAYS_SHOW_TITLE, SET_EMBED_TYPE, COPY, COPY_LINK (deprecated), DELETE
|
|
62
62
|
* Shared: SEPARATOR (usable in both)
|
|
63
63
|
*/
|
|
@@ -68,6 +68,8 @@ var BUILTIN_TOOLBAR_KEYS = exports.BUILTIN_TOOLBAR_KEYS = {
|
|
|
68
68
|
SUMMARISE: 'summarise',
|
|
69
69
|
REFRESH: 'refresh',
|
|
70
70
|
EDIT: 'edit',
|
|
71
|
+
/** Opens unresolved comments or starts a whole-block comment draft. */
|
|
72
|
+
COMMENT: 'comment',
|
|
71
73
|
EMBED: 'embed',
|
|
72
74
|
BORDER: 'border',
|
|
73
75
|
ALIGNMENT: 'alignment',
|
|
@@ -89,4 +91,4 @@ var BUILTIN_TOOLBAR_KEYS = exports.BUILTIN_TOOLBAR_KEYS = {
|
|
|
89
91
|
DELETE: 'delete',
|
|
90
92
|
SEPARATOR: 'separator'
|
|
91
93
|
};
|
|
92
|
-
var EDITOR_TOOLBAR_HANDLER_KEYS = exports.EDITOR_TOOLBAR_HANDLER_KEYS = ['onAlignmentClick', 'onAppearanceClick', 'onAskRovoClick', 'onSummariseClick', 'onChangeBorderClick', 'onCopyClick', 'onCopyLinkClick', 'onDeleteClick', 'onEditClick', 'onEditUrlClick', 'onExpandClick', 'onOpenInNewWindowClick', 'onRefreshClick', 'onSetEmbedTypeClick', 'onShowTitleClick'];
|
|
94
|
+
var EDITOR_TOOLBAR_HANDLER_KEYS = exports.EDITOR_TOOLBAR_HANDLER_KEYS = ['onAlignmentClick', 'onAppearanceClick', 'onAskRovoClick', 'onSummariseClick', 'onChangeBorderClick', 'onCommentClick', 'onCopyClick', 'onCopyLinkClick', 'onDeleteClick', 'onEditClick', 'onEditUrlClick', 'onExpandClick', 'onOpenInNewWindowClick', 'onRefreshClick', 'onSetEmbedTypeClick', 'onShowTitleClick'];
|
|
@@ -51,7 +51,7 @@ export const NATIVE_EMBED_PARAMETER_DEFAULTS = {
|
|
|
51
51
|
/**
|
|
52
52
|
* Built-in keys that can be referenced in the `items` and `moreItems` arrays.
|
|
53
53
|
*
|
|
54
|
-
* Toolbar keys: ASK_ROVO, SUMMARISE, REFRESH, EDIT, EMBED, BORDER, ALIGNMENT, OPEN_IN_NEW_WINDOW
|
|
54
|
+
* Toolbar keys: ASK_ROVO, SUMMARISE, REFRESH, EDIT, COMMENT, EMBED, BORDER, ALIGNMENT, OPEN_IN_NEW_WINDOW
|
|
55
55
|
* More Options dropdown keys: ALWAYS_SHOW_TITLE, SET_EMBED_TYPE, COPY, COPY_LINK (deprecated), DELETE
|
|
56
56
|
* Shared: SEPARATOR (usable in both)
|
|
57
57
|
*/
|
|
@@ -62,6 +62,8 @@ export const BUILTIN_TOOLBAR_KEYS = {
|
|
|
62
62
|
SUMMARISE: 'summarise',
|
|
63
63
|
REFRESH: 'refresh',
|
|
64
64
|
EDIT: 'edit',
|
|
65
|
+
/** Opens unresolved comments or starts a whole-block comment draft. */
|
|
66
|
+
COMMENT: 'comment',
|
|
65
67
|
EMBED: 'embed',
|
|
66
68
|
BORDER: 'border',
|
|
67
69
|
ALIGNMENT: 'alignment',
|
|
@@ -83,4 +85,4 @@ export const BUILTIN_TOOLBAR_KEYS = {
|
|
|
83
85
|
DELETE: 'delete',
|
|
84
86
|
SEPARATOR: 'separator'
|
|
85
87
|
};
|
|
86
|
-
export const EDITOR_TOOLBAR_HANDLER_KEYS = ['onAlignmentClick', 'onAppearanceClick', 'onAskRovoClick', 'onSummariseClick', 'onChangeBorderClick', 'onCopyClick', 'onCopyLinkClick', 'onDeleteClick', 'onEditClick', 'onEditUrlClick', 'onExpandClick', 'onOpenInNewWindowClick', 'onRefreshClick', 'onSetEmbedTypeClick', 'onShowTitleClick'];
|
|
88
|
+
export const EDITOR_TOOLBAR_HANDLER_KEYS = ['onAlignmentClick', 'onAppearanceClick', 'onAskRovoClick', 'onSummariseClick', 'onChangeBorderClick', 'onCommentClick', 'onCopyClick', 'onCopyLinkClick', 'onDeleteClick', 'onEditClick', 'onEditUrlClick', 'onExpandClick', 'onOpenInNewWindowClick', 'onRefreshClick', 'onSetEmbedTypeClick', 'onShowTitleClick'];
|
|
@@ -51,7 +51,7 @@ export var NATIVE_EMBED_PARAMETER_DEFAULTS = {
|
|
|
51
51
|
/**
|
|
52
52
|
* Built-in keys that can be referenced in the `items` and `moreItems` arrays.
|
|
53
53
|
*
|
|
54
|
-
* Toolbar keys: ASK_ROVO, SUMMARISE, REFRESH, EDIT, EMBED, BORDER, ALIGNMENT, OPEN_IN_NEW_WINDOW
|
|
54
|
+
* Toolbar keys: ASK_ROVO, SUMMARISE, REFRESH, EDIT, COMMENT, EMBED, BORDER, ALIGNMENT, OPEN_IN_NEW_WINDOW
|
|
55
55
|
* More Options dropdown keys: ALWAYS_SHOW_TITLE, SET_EMBED_TYPE, COPY, COPY_LINK (deprecated), DELETE
|
|
56
56
|
* Shared: SEPARATOR (usable in both)
|
|
57
57
|
*/
|
|
@@ -62,6 +62,8 @@ export var BUILTIN_TOOLBAR_KEYS = {
|
|
|
62
62
|
SUMMARISE: 'summarise',
|
|
63
63
|
REFRESH: 'refresh',
|
|
64
64
|
EDIT: 'edit',
|
|
65
|
+
/** Opens unresolved comments or starts a whole-block comment draft. */
|
|
66
|
+
COMMENT: 'comment',
|
|
65
67
|
EMBED: 'embed',
|
|
66
68
|
BORDER: 'border',
|
|
67
69
|
ALIGNMENT: 'alignment',
|
|
@@ -83,4 +85,4 @@ export var BUILTIN_TOOLBAR_KEYS = {
|
|
|
83
85
|
DELETE: 'delete',
|
|
84
86
|
SEPARATOR: 'separator'
|
|
85
87
|
};
|
|
86
|
-
export var EDITOR_TOOLBAR_HANDLER_KEYS = ['onAlignmentClick', 'onAppearanceClick', 'onAskRovoClick', 'onSummariseClick', 'onChangeBorderClick', 'onCopyClick', 'onCopyLinkClick', 'onDeleteClick', 'onEditClick', 'onEditUrlClick', 'onExpandClick', 'onOpenInNewWindowClick', 'onRefreshClick', 'onSetEmbedTypeClick', 'onShowTitleClick'];
|
|
88
|
+
export var EDITOR_TOOLBAR_HANDLER_KEYS = ['onAlignmentClick', 'onAppearanceClick', 'onAskRovoClick', 'onSummariseClick', 'onChangeBorderClick', 'onCommentClick', 'onCopyClick', 'onCopyLinkClick', 'onDeleteClick', 'onEditClick', 'onEditUrlClick', 'onExpandClick', 'onOpenInNewWindowClick', 'onRefreshClick', 'onSetEmbedTypeClick', 'onShowTitleClick'];
|
|
@@ -23,7 +23,7 @@ export declare const NATIVE_EMBED_PARAMETER_DEFAULTS: NativeEmbedParameterValues
|
|
|
23
23
|
/**
|
|
24
24
|
* Built-in keys that can be referenced in the `items` and `moreItems` arrays.
|
|
25
25
|
*
|
|
26
|
-
* Toolbar keys: ASK_ROVO, SUMMARISE, REFRESH, EDIT, EMBED, BORDER, ALIGNMENT, OPEN_IN_NEW_WINDOW
|
|
26
|
+
* Toolbar keys: ASK_ROVO, SUMMARISE, REFRESH, EDIT, COMMENT, EMBED, BORDER, ALIGNMENT, OPEN_IN_NEW_WINDOW
|
|
27
27
|
* More Options dropdown keys: ALWAYS_SHOW_TITLE, SET_EMBED_TYPE, COPY, COPY_LINK (deprecated), DELETE
|
|
28
28
|
* Shared: SEPARATOR (usable in both)
|
|
29
29
|
*/
|
|
@@ -34,6 +34,8 @@ export declare const BUILTIN_TOOLBAR_KEYS: {
|
|
|
34
34
|
readonly SUMMARISE: 'summarise';
|
|
35
35
|
readonly REFRESH: 'refresh';
|
|
36
36
|
readonly EDIT: 'edit';
|
|
37
|
+
/** Opens unresolved comments or starts a whole-block comment draft. */
|
|
38
|
+
readonly COMMENT: 'comment';
|
|
37
39
|
readonly EMBED: 'embed';
|
|
38
40
|
readonly BORDER: 'border';
|
|
39
41
|
readonly ALIGNMENT: 'alignment';
|
|
@@ -55,4 +57,4 @@ export declare const BUILTIN_TOOLBAR_KEYS: {
|
|
|
55
57
|
readonly DELETE: 'delete';
|
|
56
58
|
readonly SEPARATOR: 'separator';
|
|
57
59
|
};
|
|
58
|
-
export declare const EDITOR_TOOLBAR_HANDLER_KEYS: readonly ['onAlignmentClick', 'onAppearanceClick', 'onAskRovoClick', 'onSummariseClick', 'onChangeBorderClick', 'onCopyClick', 'onCopyLinkClick', 'onDeleteClick', 'onEditClick', 'onEditUrlClick', 'onExpandClick', 'onOpenInNewWindowClick', 'onRefreshClick', 'onSetEmbedTypeClick', 'onShowTitleClick'];
|
|
60
|
+
export declare const EDITOR_TOOLBAR_HANDLER_KEYS: readonly ['onAlignmentClick', 'onAppearanceClick', 'onAskRovoClick', 'onSummariseClick', 'onChangeBorderClick', 'onCommentClick', 'onCopyClick', 'onCopyLinkClick', 'onDeleteClick', 'onEditClick', 'onEditUrlClick', 'onExpandClick', 'onOpenInNewWindowClick', 'onRefreshClick', 'onSetEmbedTypeClick', 'onShowTitleClick'];
|
|
@@ -114,6 +114,11 @@ export type EditorToolbarHandlers = Partial<{
|
|
|
114
114
|
onAppearanceClick: (parameters: NativeEmbedParameterValues, appearance: NativeEmbedAppearance, context?: EditorToolbarHandlerContext) => void;
|
|
115
115
|
onAskRovoClick: (parameters: NativeEmbedParameterValues, context?: EditorToolbarHandlerContext) => void;
|
|
116
116
|
onChangeBorderClick: EditorToolbarHandler;
|
|
117
|
+
/**
|
|
118
|
+
* Handler invoked when the Comment action is clicked.
|
|
119
|
+
* The default editor handler opens unresolved block comments before starting a new draft.
|
|
120
|
+
*/
|
|
121
|
+
onCommentClick: EditorToolbarHandler;
|
|
117
122
|
/**
|
|
118
123
|
* Handler invoked when the Copy action is clicked.
|
|
119
124
|
* Copies the native-embed node to the clipboard.
|
|
@@ -162,7 +167,7 @@ export type ManifestEditorToolbarActions<TCustomActions extends Record<string, E
|
|
|
162
167
|
* The "More Options" dropdown is appended automatically based on `moreItems`.
|
|
163
168
|
*
|
|
164
169
|
* Can include:
|
|
165
|
-
* - Built-in keys: 'refresh', 'embed', 'border', 'alignment', 'openInNewWindow'
|
|
170
|
+
* - Built-in keys: 'refresh', 'comment', 'embed', 'border', 'alignment', 'openInNewWindow'
|
|
166
171
|
* - 'separator' for visual separators between groups
|
|
167
172
|
* - Custom keys defined in `customActions`
|
|
168
173
|
*/
|
package/package.json
CHANGED
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
"atlaskit:src": "src/index.ts",
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@atlaskit/button": "^25.4.0",
|
|
20
|
-
"@atlaskit/editor-common": "^126.
|
|
20
|
+
"@atlaskit/editor-common": "^126.2.0",
|
|
21
21
|
"@atlaskit/editor-plugin-local-id": "^20.0.0",
|
|
22
22
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
23
23
|
"@atlaskit/heading": "^8.0.0",
|
|
24
24
|
"@atlaskit/icon": "^38.0.0",
|
|
25
25
|
"@atlaskit/primitives": "^22.5.0",
|
|
26
|
-
"@atlaskit/tokens": "^20.
|
|
26
|
+
"@atlaskit/tokens": "^20.1.0",
|
|
27
27
|
"@atlassian/afm-i18n-platform-native-embeds-native-embeds-common": "1.7.0",
|
|
28
28
|
"@babel/runtime": "^7.0.0",
|
|
29
29
|
"@compiled/react": "^1.0.2",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"react-intl": "^7.0.0"
|
|
45
45
|
},
|
|
46
46
|
"name": "@atlaskit/native-embeds-common",
|
|
47
|
-
"version": "2.
|
|
47
|
+
"version": "2.6.0",
|
|
48
48
|
"description": "A shared package for native embeds to be used across experiences and plugin",
|
|
49
49
|
"author": "Atlassian Pty Ltd",
|
|
50
50
|
"license": "Apache-2.0",
|