@atlaskit/editor-common 127.1.1 → 128.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 +35 -0
- package/analytics/ai-suggestions-entry-points/package.json +10 -0
- package/analytics/ai-suggestions-regeneration/package.json +10 -0
- package/dist/cjs/analytics/types/ai-suggestions-events.js +47 -1
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/quick-insert/getQuickInsertProviderMenuItemKey.js +7 -0
- package/dist/cjs/quick-insert/is-recommended-item.js +16 -10
- package/dist/cjs/quick-insert/keys.js +9 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/analytics/types/ai-suggestions-events.js +46 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/quick-insert/getQuickInsertProviderMenuItemKey.js +7 -0
- package/dist/es2019/quick-insert/is-recommended-item.js +13 -13
- package/dist/es2019/quick-insert/keys.js +8 -0
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/analytics/types/ai-suggestions-events.js +46 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/quick-insert/getQuickInsertProviderMenuItemKey.js +7 -0
- package/dist/esm/quick-insert/is-recommended-item.js +15 -8
- package/dist/esm/quick-insert/keys.js +8 -0
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/analytics/types/ai-suggestions-events.d.ts +42 -21
- package/dist/types/quick-insert/getQuickInsertProviderMenuItemKey.d.ts +1 -0
- package/dist/types/quick-insert/is-recommended-item.d.ts +7 -2
- package/dist/types/quick-insert/keys.d.ts +8 -0
- package/dist/types/types/quick-insert.d.ts +0 -2
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 128.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`a71ad686528a4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a71ad686528a4) -
|
|
8
|
+
Breaking changes
|
|
9
|
+
|
|
10
|
+
QuickInsertPluginOptions (deprecated, from @atlaskit/editor-common/types) no longer has
|
|
11
|
+
isRecommendedItem. Use the isRecommendedItem option on @atlaskit/editor-plugin-quick-insert
|
|
12
|
+
instead. IsRecommendedItemResult changed from number | null to { rank: number } | null. Custom
|
|
13
|
+
isRecommendedItem functions must return { rank } instead of a number.
|
|
14
|
+
|
|
15
|
+
Additions
|
|
16
|
+
|
|
17
|
+
createIsRecommendedItem(orderedKeys) builds an isRecommendedItem from an ordered list of keys.
|
|
18
|
+
quickInsertProviderMenuItemKey.getSourceKey returns a provider item's source key
|
|
19
|
+
(manifestKey:moduleKey). New TABS_MENU_ITEM and ADD_SUGGESTIONS_TO_CONTENT_SKILL_MENU_ITEM quick
|
|
20
|
+
insert keys.
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
|
|
26
|
+
## 127.2.0
|
|
27
|
+
|
|
28
|
+
### Minor Changes
|
|
29
|
+
|
|
30
|
+
- [`823f26ef0b0ba`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/823f26ef0b0ba) -
|
|
31
|
+
Add uppercase named enum values for Suggested Edits regeneration and entry-point analytics, and
|
|
32
|
+
use them at production call sites while preserving existing string types and emitted values.
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- Updated dependencies
|
|
37
|
+
|
|
3
38
|
## 127.1.1
|
|
4
39
|
|
|
5
40
|
### Patch Changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-common/analytics/ai-suggestions-entry-points",
|
|
3
|
+
"main": "../../dist/cjs/analytics/types/ai-suggestions-events.js",
|
|
4
|
+
"module": "../../dist/esm/analytics/types/ai-suggestions-events.js",
|
|
5
|
+
"module:es2019": "../../dist/es2019/analytics/types/ai-suggestions-events.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../../dist/types/analytics/types/ai-suggestions-events.d.ts"
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-common/analytics/ai-suggestions-regeneration",
|
|
3
|
+
"main": "../../dist/cjs/analytics/types/ai-suggestions-events.js",
|
|
4
|
+
"module": "../../dist/esm/analytics/types/ai-suggestions-events.js",
|
|
5
|
+
"module:es2019": "../../dist/es2019/analytics/types/ai-suggestions-events.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../../dist/types/analytics/types/ai-suggestions-events.d.ts"
|
|
10
|
+
}
|
|
@@ -2,4 +2,50 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
|
-
});
|
|
5
|
+
});
|
|
6
|
+
exports.AiSuggestionsRightRailEntryPointValue = exports.AiSuggestionsRegenerationTriggerValue = exports.AiSuggestionsRegenerationOutcomeValue = exports.AiSuggestionsEntryPointValue = void 0;
|
|
7
|
+
var AiSuggestionsEntryPointValue = exports.AiSuggestionsEntryPointValue = /*#__PURE__*/function (AiSuggestionsEntryPointValue) {
|
|
8
|
+
AiSuggestionsEntryPointValue["PRIMARY_TOOLBAR"] = "primaryToolbar";
|
|
9
|
+
/**
|
|
10
|
+
* @private
|
|
11
|
+
* @deprecated Legacy entry point retained for backwards compatibility.
|
|
12
|
+
* Use `SUGGESTIONS_PANEL_EMPTY_STATE` for the standalone suggestions panel.
|
|
13
|
+
*/
|
|
14
|
+
AiSuggestionsEntryPointValue["COMMENTS_EMPTY_STATE"] = "commentsEmptyState";
|
|
15
|
+
AiSuggestionsEntryPointValue["SUGGESTIONS_PANEL_EMPTY_STATE"] = "suggestionsPanelEmptyState";
|
|
16
|
+
AiSuggestionsEntryPointValue["SUGGESTIONS_PANEL_HEADER"] = "suggestionsPanelHeader";
|
|
17
|
+
AiSuggestionsEntryPointValue["OBJECT_SIDEBAR_CONTROL"] = "objectSidebarControl";
|
|
18
|
+
/**
|
|
19
|
+
* @private
|
|
20
|
+
* @deprecated Legacy automatic-generation entry point retained for backwards compatibility.
|
|
21
|
+
*/
|
|
22
|
+
AiSuggestionsEntryPointValue["SUGGESTIONS_PANEL_MOUNT"] = "suggestionsPanelMount";
|
|
23
|
+
/** The "Review" button on the follow-up card after the last suggestion is actioned. */
|
|
24
|
+
AiSuggestionsEntryPointValue["FOLLOW_UP_CARD"] = "followUpCard";
|
|
25
|
+
return AiSuggestionsEntryPointValue;
|
|
26
|
+
}({});
|
|
27
|
+
var AiSuggestionsRightRailEntryPointValue = exports.AiSuggestionsRightRailEntryPointValue = /*#__PURE__*/function (AiSuggestionsRightRailEntryPointValue) {
|
|
28
|
+
AiSuggestionsRightRailEntryPointValue["SUGGESTIONS_PANEL"] = "suggestionsPanel";
|
|
29
|
+
AiSuggestionsRightRailEntryPointValue["SUGGESTIONS_TAB"] = "suggestionsTab";
|
|
30
|
+
// Will be deprecated.
|
|
31
|
+
AiSuggestionsRightRailEntryPointValue["SUGGESTION_CARD"] = "suggestionCard";
|
|
32
|
+
return AiSuggestionsRightRailEntryPointValue;
|
|
33
|
+
}({});
|
|
34
|
+
var AiSuggestionsRegenerationTriggerValue = exports.AiSuggestionsRegenerationTriggerValue = /*#__PURE__*/function (AiSuggestionsRegenerationTriggerValue) {
|
|
35
|
+
AiSuggestionsRegenerationTriggerValue["PANEL_OPEN"] = "panelOpen";
|
|
36
|
+
AiSuggestionsRegenerationTriggerValue["REVIEW_COMPLETED"] = "reviewCompleted";
|
|
37
|
+
AiSuggestionsRegenerationTriggerValue["SUGGESTION_SELECTED"] = "suggestionSelected";
|
|
38
|
+
AiSuggestionsRegenerationTriggerValue["SUGGESTIONS_UPDATED"] = "suggestionsUpdated";
|
|
39
|
+
return AiSuggestionsRegenerationTriggerValue;
|
|
40
|
+
}({});
|
|
41
|
+
var AiSuggestionsRegenerationOutcomeValue = exports.AiSuggestionsRegenerationOutcomeValue = /*#__PURE__*/function (AiSuggestionsRegenerationOutcomeValue) {
|
|
42
|
+
AiSuggestionsRegenerationOutcomeValue["REMOVED"] = "removed";
|
|
43
|
+
AiSuggestionsRegenerationOutcomeValue["STILL_STALE"] = "stillStale";
|
|
44
|
+
AiSuggestionsRegenerationOutcomeValue["UPDATED"] = "updated";
|
|
45
|
+
return AiSuggestionsRegenerationOutcomeValue;
|
|
46
|
+
}({});
|
|
47
|
+
/**
|
|
48
|
+
* Fired when the user clicks the "Try again" / retry button on the suggested
|
|
49
|
+
* edits error screen (the thinking bar's error state). Lets us measure how
|
|
50
|
+
* often users attempt to recover from a suggestions failure.
|
|
51
|
+
*/
|
|
@@ -27,7 +27,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
27
27
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
28
28
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
29
29
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
30
|
-
var packageVersion = "127.
|
|
30
|
+
var packageVersion = "127.2.0";
|
|
31
31
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
32
32
|
// Remove URL as it has UGC
|
|
33
33
|
// Ignored via go/ees007
|
|
@@ -15,8 +15,15 @@ var isEcosystemQuickInsertProviderMenuItemKey = function isEcosystemQuickInsertP
|
|
|
15
15
|
var normalizeQuickInsertProviderMenuItemKey = function normalizeQuickInsertProviderMenuItemKey(key) {
|
|
16
16
|
return isEcosystemQuickInsertProviderMenuItemKey(key) ? "".concat(QUICK_INSERT_PROVIDER_MENU_ITEM_KEY_PREFIX).concat(key.slice("".concat(ECOSYSTEM_QUICK_INSERT_PROVIDER_MENU_ITEM_KEY_PREFIX, "-").length)) : key;
|
|
17
17
|
};
|
|
18
|
+
|
|
19
|
+
/** Reverses `getQuickInsertProviderMenuItemKey`; keys without a provider prefix are returned unchanged. */
|
|
20
|
+
var getQuickInsertProviderMenuItemSourceKey = function getQuickInsertProviderMenuItemSourceKey(key) {
|
|
21
|
+
var normalizedKey = normalizeQuickInsertProviderMenuItemKey(key);
|
|
22
|
+
return normalizedKey.startsWith(QUICK_INSERT_PROVIDER_MENU_ITEM_KEY_PREFIX) ? normalizedKey.slice(QUICK_INSERT_PROVIDER_MENU_ITEM_KEY_PREFIX.length) : key;
|
|
23
|
+
};
|
|
18
24
|
var quickInsertProviderMenuItemKey = exports.quickInsertProviderMenuItemKey = {
|
|
19
25
|
get: getQuickInsertProviderMenuItemKey,
|
|
26
|
+
getSourceKey: getQuickInsertProviderMenuItemSourceKey,
|
|
20
27
|
isEcosystem: isEcosystemQuickInsertProviderMenuItemKey,
|
|
21
28
|
normalize: normalizeQuickInsertProviderMenuItemKey
|
|
22
29
|
};
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
exports.defaultIsRecommendedItem = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
6
|
+
exports.defaultIsRecommendedItem = exports.createIsRecommendedItem = void 0;
|
|
9
7
|
var _keys = require("./keys");
|
|
10
|
-
/** Resolves an item's recommendation
|
|
8
|
+
/** Resolves an item's recommendation, or excludes it with `null`. Lower ranks are shown first. */
|
|
11
9
|
|
|
12
|
-
|
|
10
|
+
/** Recommends the given item keys, ranked by their position in the list. */
|
|
11
|
+
var createIsRecommendedItem = exports.createIsRecommendedItem = function createIsRecommendedItem(orderedKeys) {
|
|
12
|
+
var ranks = new Map(orderedKeys.map(function (key, index) {
|
|
13
|
+
return [key, index];
|
|
14
|
+
}));
|
|
15
|
+
return function (_ref) {
|
|
16
|
+
var itemKey = _ref.itemKey;
|
|
17
|
+
var rank = ranks.get(itemKey);
|
|
18
|
+
return rank === undefined ? null : {
|
|
19
|
+
rank: rank
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
13
23
|
|
|
14
24
|
/** Default Quick Insert recommendations in their intended display order. */
|
|
15
|
-
var defaultIsRecommendedItem = exports.defaultIsRecommendedItem =
|
|
16
|
-
var _defaultRanks$itemKey;
|
|
17
|
-
var itemKey = _ref.itemKey;
|
|
18
|
-
return (_defaultRanks$itemKey = defaultRanks[itemKey]) !== null && _defaultRanks$itemKey !== void 0 ? _defaultRanks$itemKey : null;
|
|
19
|
-
};
|
|
25
|
+
var defaultIsRecommendedItem = exports.defaultIsRecommendedItem = createIsRecommendedItem([_keys.ASK_ROVO_MENU_ITEM.key, _keys.HYPERLINK_MENU_ITEM.key, _keys.MEDIA_INSERT_MENU_ITEM.key, _keys.EMOJI_MENU_ITEM.key, _keys.MENTION_MENU_ITEM.key]);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getBlockTemplateMenuItem = exports.WHITEBOARD_MENU_ITEM = exports.WARNING_PANEL_MENU_ITEM = exports.VIEW_ALL_ELEMENTS_MENU_ITEM = exports.UNORDERED_LIST_MENU_ITEM = exports.TWO_COLUMNS_LAYOUT_MENU_ITEM = exports.THREE_COLUMNS_LAYOUT_MENU_ITEM = exports.TEXT_FORMATTING_SECTION = exports.TABLE_MENU_ITEM = exports.SYNCED_BLOCK_MENU_ITEM = exports.SUCCESS_PANEL_MENU_ITEM = exports.STRUCTURE_SECTION = exports.STATUS_MENU_ITEM = exports.RULE_MENU_ITEM = exports.ROVO_SECTION = exports.ROADMAP_MENU_ITEM = exports.RETROSPECTIVE_MENU_ITEM = exports.RECOMMENDED_SECTION = exports.PLACEHOLDER_TEXT_MENU_ITEM = exports.OTHER_SECTION = exports.ORDERED_LIST_MENU_ITEM = exports.NOTE_PANEL_MENU_ITEM = exports.MENU = exports.MENTION_MENU_ITEM = exports.MEDIA_SECTION = exports.MEDIA_INSERT_MENU_ITEM = exports.LOOM_MENU_ITEM = exports.JIRA_WORK_ITEMS_MENU_ITEM = exports.JIRA_ISSUE_MENU_ITEM = exports.INFO_PANEL_MENU_ITEM = exports.HYPERLINK_MENU_ITEM = exports.HELP_DIALOG_MENU_ITEM = exports.HEADING_6_MENU_ITEM = exports.HEADING_5_MENU_ITEM = exports.HEADING_4_MENU_ITEM = exports.HEADING_3_MENU_ITEM = exports.HEADING_2_MENU_ITEM = exports.HEADING_1_MENU_ITEM = exports.FOUR_COLUMNS_LAYOUT_MENU_ITEM = exports.FLOWCHART_MENU_ITEM = exports.FIVE_COLUMNS_LAYOUT_MENU_ITEM = exports.EXPAND_MENU_ITEM = exports.ERROR_PANEL_MENU_ITEM = exports.EMOJI_MENU_ITEM = exports.EMBED_SECTION = exports.DIAGRAM_MENU_ITEM = exports.DECISION_MENU_ITEM = exports.DATE_MENU_ITEM = exports.DATA_AND_CHARTS_SECTION = exports.DATABASE_MENU_ITEM = exports.CUSTOM_PANEL_MENU_ITEM = exports.CREATE_SECTION = exports.CONFLUENCE_PAGE_MENU_ITEM = exports.CONFLUENCE_LIST_MENU_ITEM = exports.CODE_BLOCK_MENU_ITEM = exports.BRAINSTORMING_MENU_ITEM = exports.BLOCK_TEMPLATES_SECTION = exports.BLOCKQUOTE_MENU_ITEM = exports.ASSETS_MENU_ITEM = exports.ASK_ROVO_MENU_ITEM = exports.AI_IMAGE_GENERATION_MENU_ITEM = exports.ACTION_MENU_ITEM = void 0;
|
|
6
|
+
exports.getBlockTemplateMenuItem = exports.WHITEBOARD_MENU_ITEM = exports.WARNING_PANEL_MENU_ITEM = exports.VIEW_ALL_ELEMENTS_MENU_ITEM = exports.UNORDERED_LIST_MENU_ITEM = exports.TWO_COLUMNS_LAYOUT_MENU_ITEM = exports.THREE_COLUMNS_LAYOUT_MENU_ITEM = exports.TEXT_FORMATTING_SECTION = exports.TABS_MENU_ITEM = exports.TABLE_MENU_ITEM = exports.SYNCED_BLOCK_MENU_ITEM = exports.SUCCESS_PANEL_MENU_ITEM = exports.STRUCTURE_SECTION = exports.STATUS_MENU_ITEM = exports.RULE_MENU_ITEM = exports.ROVO_SECTION = exports.ROADMAP_MENU_ITEM = exports.RETROSPECTIVE_MENU_ITEM = exports.RECOMMENDED_SECTION = exports.PLACEHOLDER_TEXT_MENU_ITEM = exports.OTHER_SECTION = exports.ORDERED_LIST_MENU_ITEM = exports.NOTE_PANEL_MENU_ITEM = exports.MENU = exports.MENTION_MENU_ITEM = exports.MEDIA_SECTION = exports.MEDIA_INSERT_MENU_ITEM = exports.LOOM_MENU_ITEM = exports.JIRA_WORK_ITEMS_MENU_ITEM = exports.JIRA_ISSUE_MENU_ITEM = exports.INFO_PANEL_MENU_ITEM = exports.HYPERLINK_MENU_ITEM = exports.HELP_DIALOG_MENU_ITEM = exports.HEADING_6_MENU_ITEM = exports.HEADING_5_MENU_ITEM = exports.HEADING_4_MENU_ITEM = exports.HEADING_3_MENU_ITEM = exports.HEADING_2_MENU_ITEM = exports.HEADING_1_MENU_ITEM = exports.FOUR_COLUMNS_LAYOUT_MENU_ITEM = exports.FLOWCHART_MENU_ITEM = exports.FIVE_COLUMNS_LAYOUT_MENU_ITEM = exports.EXPAND_MENU_ITEM = exports.ERROR_PANEL_MENU_ITEM = exports.EMOJI_MENU_ITEM = exports.EMBED_SECTION = exports.DIAGRAM_MENU_ITEM = exports.DECISION_MENU_ITEM = exports.DATE_MENU_ITEM = exports.DATA_AND_CHARTS_SECTION = exports.DATABASE_MENU_ITEM = exports.CUSTOM_PANEL_MENU_ITEM = exports.CREATE_SECTION = exports.CONFLUENCE_PAGE_MENU_ITEM = exports.CONFLUENCE_LIST_MENU_ITEM = exports.CODE_BLOCK_MENU_ITEM = exports.BRAINSTORMING_MENU_ITEM = exports.BLOCK_TEMPLATES_SECTION = exports.BLOCKQUOTE_MENU_ITEM = exports.ASSETS_MENU_ITEM = exports.ASK_ROVO_MENU_ITEM = exports.AI_IMAGE_GENERATION_MENU_ITEM = exports.ADD_SUGGESTIONS_TO_CONTENT_SKILL_MENU_ITEM = exports.ACTION_MENU_ITEM = void 0;
|
|
7
7
|
/* eslint-disable @atlaskit/volt-strict-mode/no-multiple-exports */
|
|
8
8
|
|
|
9
9
|
var MENU = exports.MENU = {
|
|
@@ -174,6 +174,14 @@ var DATABASE_MENU_ITEM = exports.DATABASE_MENU_ITEM = {
|
|
|
174
174
|
key: 'database-extension:create-database',
|
|
175
175
|
type: 'menu-item'
|
|
176
176
|
};
|
|
177
|
+
var TABS_MENU_ITEM = exports.TABS_MENU_ITEM = {
|
|
178
|
+
key: 'native-tabs:native-tabs',
|
|
179
|
+
type: 'menu-item'
|
|
180
|
+
};
|
|
181
|
+
var ADD_SUGGESTIONS_TO_CONTENT_SKILL_MENU_ITEM = exports.ADD_SUGGESTIONS_TO_CONTENT_SKILL_MENU_ITEM = {
|
|
182
|
+
key: 'skill:add-suggestions-to-content',
|
|
183
|
+
type: 'menu-item'
|
|
184
|
+
};
|
|
177
185
|
var MENTION_MENU_ITEM = exports.MENTION_MENU_ITEM = {
|
|
178
186
|
key: 'quick-insert-mention-menu-item',
|
|
179
187
|
type: 'menu-item'
|
|
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
24
24
|
* @jsx jsx
|
|
25
25
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "127.
|
|
27
|
+
var packageVersion = "127.2.0";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -1 +1,46 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export let AiSuggestionsEntryPointValue = /*#__PURE__*/function (AiSuggestionsEntryPointValue) {
|
|
2
|
+
AiSuggestionsEntryPointValue["PRIMARY_TOOLBAR"] = "primaryToolbar";
|
|
3
|
+
/**
|
|
4
|
+
* @private
|
|
5
|
+
* @deprecated Legacy entry point retained for backwards compatibility.
|
|
6
|
+
* Use `SUGGESTIONS_PANEL_EMPTY_STATE` for the standalone suggestions panel.
|
|
7
|
+
*/
|
|
8
|
+
AiSuggestionsEntryPointValue["COMMENTS_EMPTY_STATE"] = "commentsEmptyState";
|
|
9
|
+
AiSuggestionsEntryPointValue["SUGGESTIONS_PANEL_EMPTY_STATE"] = "suggestionsPanelEmptyState";
|
|
10
|
+
AiSuggestionsEntryPointValue["SUGGESTIONS_PANEL_HEADER"] = "suggestionsPanelHeader";
|
|
11
|
+
AiSuggestionsEntryPointValue["OBJECT_SIDEBAR_CONTROL"] = "objectSidebarControl";
|
|
12
|
+
/**
|
|
13
|
+
* @private
|
|
14
|
+
* @deprecated Legacy automatic-generation entry point retained for backwards compatibility.
|
|
15
|
+
*/
|
|
16
|
+
AiSuggestionsEntryPointValue["SUGGESTIONS_PANEL_MOUNT"] = "suggestionsPanelMount";
|
|
17
|
+
/** The "Review" button on the follow-up card after the last suggestion is actioned. */
|
|
18
|
+
AiSuggestionsEntryPointValue["FOLLOW_UP_CARD"] = "followUpCard";
|
|
19
|
+
return AiSuggestionsEntryPointValue;
|
|
20
|
+
}({});
|
|
21
|
+
export let AiSuggestionsRightRailEntryPointValue = /*#__PURE__*/function (AiSuggestionsRightRailEntryPointValue) {
|
|
22
|
+
AiSuggestionsRightRailEntryPointValue["SUGGESTIONS_PANEL"] = "suggestionsPanel";
|
|
23
|
+
AiSuggestionsRightRailEntryPointValue["SUGGESTIONS_TAB"] = "suggestionsTab";
|
|
24
|
+
// Will be deprecated.
|
|
25
|
+
AiSuggestionsRightRailEntryPointValue["SUGGESTION_CARD"] = "suggestionCard";
|
|
26
|
+
return AiSuggestionsRightRailEntryPointValue;
|
|
27
|
+
}({});
|
|
28
|
+
export let AiSuggestionsRegenerationTriggerValue = /*#__PURE__*/function (AiSuggestionsRegenerationTriggerValue) {
|
|
29
|
+
AiSuggestionsRegenerationTriggerValue["PANEL_OPEN"] = "panelOpen";
|
|
30
|
+
AiSuggestionsRegenerationTriggerValue["REVIEW_COMPLETED"] = "reviewCompleted";
|
|
31
|
+
AiSuggestionsRegenerationTriggerValue["SUGGESTION_SELECTED"] = "suggestionSelected";
|
|
32
|
+
AiSuggestionsRegenerationTriggerValue["SUGGESTIONS_UPDATED"] = "suggestionsUpdated";
|
|
33
|
+
return AiSuggestionsRegenerationTriggerValue;
|
|
34
|
+
}({});
|
|
35
|
+
export let AiSuggestionsRegenerationOutcomeValue = /*#__PURE__*/function (AiSuggestionsRegenerationOutcomeValue) {
|
|
36
|
+
AiSuggestionsRegenerationOutcomeValue["REMOVED"] = "removed";
|
|
37
|
+
AiSuggestionsRegenerationOutcomeValue["STILL_STALE"] = "stillStale";
|
|
38
|
+
AiSuggestionsRegenerationOutcomeValue["UPDATED"] = "updated";
|
|
39
|
+
return AiSuggestionsRegenerationOutcomeValue;
|
|
40
|
+
}({});
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Fired when the user clicks the "Try again" / retry button on the suggested
|
|
44
|
+
* edits error screen (the thinking bar's error state). Lets us measure how
|
|
45
|
+
* often users attempt to recover from a suggestions failure.
|
|
46
|
+
*/
|
|
@@ -13,7 +13,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
13
13
|
const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
14
14
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
15
15
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
16
|
-
const packageVersion = "127.
|
|
16
|
+
const packageVersion = "127.2.0";
|
|
17
17
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
18
18
|
// Remove URL as it has UGC
|
|
19
19
|
// Ignored via go/ees007
|
|
@@ -3,8 +3,15 @@ const ECOSYSTEM_QUICK_INSERT_PROVIDER_MENU_ITEM_KEY_PREFIX = 'quick-insert-ecosy
|
|
|
3
3
|
export const getQuickInsertProviderMenuItemKey = (key, app) => (app === null || app === void 0 ? void 0 : app.source) === 'ecosystem' ? `${ECOSYSTEM_QUICK_INSERT_PROVIDER_MENU_ITEM_KEY_PREFIX}-${key}` : `${QUICK_INSERT_PROVIDER_MENU_ITEM_KEY_PREFIX}${key}`;
|
|
4
4
|
const isEcosystemQuickInsertProviderMenuItemKey = key => key.startsWith(ECOSYSTEM_QUICK_INSERT_PROVIDER_MENU_ITEM_KEY_PREFIX);
|
|
5
5
|
const normalizeQuickInsertProviderMenuItemKey = key => isEcosystemQuickInsertProviderMenuItemKey(key) ? `${QUICK_INSERT_PROVIDER_MENU_ITEM_KEY_PREFIX}${key.slice(`${ECOSYSTEM_QUICK_INSERT_PROVIDER_MENU_ITEM_KEY_PREFIX}-`.length)}` : key;
|
|
6
|
+
|
|
7
|
+
/** Reverses `getQuickInsertProviderMenuItemKey`; keys without a provider prefix are returned unchanged. */
|
|
8
|
+
const getQuickInsertProviderMenuItemSourceKey = key => {
|
|
9
|
+
const normalizedKey = normalizeQuickInsertProviderMenuItemKey(key);
|
|
10
|
+
return normalizedKey.startsWith(QUICK_INSERT_PROVIDER_MENU_ITEM_KEY_PREFIX) ? normalizedKey.slice(QUICK_INSERT_PROVIDER_MENU_ITEM_KEY_PREFIX.length) : key;
|
|
11
|
+
};
|
|
6
12
|
export const quickInsertProviderMenuItemKey = {
|
|
7
13
|
get: getQuickInsertProviderMenuItemKey,
|
|
14
|
+
getSourceKey: getQuickInsertProviderMenuItemSourceKey,
|
|
8
15
|
isEcosystem: isEcosystemQuickInsertProviderMenuItemKey,
|
|
9
16
|
normalize: normalizeQuickInsertProviderMenuItemKey
|
|
10
17
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { ASK_ROVO_MENU_ITEM, EMOJI_MENU_ITEM, HYPERLINK_MENU_ITEM, MEDIA_INSERT_MENU_ITEM, MENTION_MENU_ITEM } from './keys';
|
|
2
2
|
|
|
3
|
-
/** Resolves an item's recommendation
|
|
3
|
+
/** Resolves an item's recommendation, or excludes it with `null`. Lower ranks are shown first. */
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
/** Recommends the given item keys, ranked by their position in the list. */
|
|
6
|
+
export const createIsRecommendedItem = orderedKeys => {
|
|
7
|
+
const ranks = new Map(orderedKeys.map((key, index) => [key, index]));
|
|
8
|
+
return ({
|
|
9
|
+
itemKey
|
|
10
|
+
}) => {
|
|
11
|
+
const rank = ranks.get(itemKey);
|
|
12
|
+
return rank === undefined ? null : {
|
|
13
|
+
rank
|
|
14
|
+
};
|
|
15
|
+
};
|
|
11
16
|
};
|
|
12
17
|
|
|
13
18
|
/** Default Quick Insert recommendations in their intended display order. */
|
|
14
|
-
export const defaultIsRecommendedItem = (
|
|
15
|
-
itemKey
|
|
16
|
-
}) => {
|
|
17
|
-
var _defaultRanks$itemKey;
|
|
18
|
-
return (_defaultRanks$itemKey = defaultRanks[itemKey]) !== null && _defaultRanks$itemKey !== void 0 ? _defaultRanks$itemKey : null;
|
|
19
|
-
};
|
|
19
|
+
export const defaultIsRecommendedItem = createIsRecommendedItem([ASK_ROVO_MENU_ITEM.key, HYPERLINK_MENU_ITEM.key, MEDIA_INSERT_MENU_ITEM.key, EMOJI_MENU_ITEM.key, MENTION_MENU_ITEM.key]);
|
|
@@ -168,6 +168,14 @@ export const DATABASE_MENU_ITEM = {
|
|
|
168
168
|
key: 'database-extension:create-database',
|
|
169
169
|
type: 'menu-item'
|
|
170
170
|
};
|
|
171
|
+
export const TABS_MENU_ITEM = {
|
|
172
|
+
key: 'native-tabs:native-tabs',
|
|
173
|
+
type: 'menu-item'
|
|
174
|
+
};
|
|
175
|
+
export const ADD_SUGGESTIONS_TO_CONTENT_SKILL_MENU_ITEM = {
|
|
176
|
+
key: 'skill:add-suggestions-to-content',
|
|
177
|
+
type: 'menu-item'
|
|
178
|
+
};
|
|
171
179
|
export const MENTION_MENU_ITEM = {
|
|
172
180
|
key: 'quick-insert-mention-menu-item',
|
|
173
181
|
type: 'menu-item'
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "127.
|
|
17
|
+
const packageVersion = "127.2.0";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -1 +1,46 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export var AiSuggestionsEntryPointValue = /*#__PURE__*/function (AiSuggestionsEntryPointValue) {
|
|
2
|
+
AiSuggestionsEntryPointValue["PRIMARY_TOOLBAR"] = "primaryToolbar";
|
|
3
|
+
/**
|
|
4
|
+
* @private
|
|
5
|
+
* @deprecated Legacy entry point retained for backwards compatibility.
|
|
6
|
+
* Use `SUGGESTIONS_PANEL_EMPTY_STATE` for the standalone suggestions panel.
|
|
7
|
+
*/
|
|
8
|
+
AiSuggestionsEntryPointValue["COMMENTS_EMPTY_STATE"] = "commentsEmptyState";
|
|
9
|
+
AiSuggestionsEntryPointValue["SUGGESTIONS_PANEL_EMPTY_STATE"] = "suggestionsPanelEmptyState";
|
|
10
|
+
AiSuggestionsEntryPointValue["SUGGESTIONS_PANEL_HEADER"] = "suggestionsPanelHeader";
|
|
11
|
+
AiSuggestionsEntryPointValue["OBJECT_SIDEBAR_CONTROL"] = "objectSidebarControl";
|
|
12
|
+
/**
|
|
13
|
+
* @private
|
|
14
|
+
* @deprecated Legacy automatic-generation entry point retained for backwards compatibility.
|
|
15
|
+
*/
|
|
16
|
+
AiSuggestionsEntryPointValue["SUGGESTIONS_PANEL_MOUNT"] = "suggestionsPanelMount";
|
|
17
|
+
/** The "Review" button on the follow-up card after the last suggestion is actioned. */
|
|
18
|
+
AiSuggestionsEntryPointValue["FOLLOW_UP_CARD"] = "followUpCard";
|
|
19
|
+
return AiSuggestionsEntryPointValue;
|
|
20
|
+
}({});
|
|
21
|
+
export var AiSuggestionsRightRailEntryPointValue = /*#__PURE__*/function (AiSuggestionsRightRailEntryPointValue) {
|
|
22
|
+
AiSuggestionsRightRailEntryPointValue["SUGGESTIONS_PANEL"] = "suggestionsPanel";
|
|
23
|
+
AiSuggestionsRightRailEntryPointValue["SUGGESTIONS_TAB"] = "suggestionsTab";
|
|
24
|
+
// Will be deprecated.
|
|
25
|
+
AiSuggestionsRightRailEntryPointValue["SUGGESTION_CARD"] = "suggestionCard";
|
|
26
|
+
return AiSuggestionsRightRailEntryPointValue;
|
|
27
|
+
}({});
|
|
28
|
+
export var AiSuggestionsRegenerationTriggerValue = /*#__PURE__*/function (AiSuggestionsRegenerationTriggerValue) {
|
|
29
|
+
AiSuggestionsRegenerationTriggerValue["PANEL_OPEN"] = "panelOpen";
|
|
30
|
+
AiSuggestionsRegenerationTriggerValue["REVIEW_COMPLETED"] = "reviewCompleted";
|
|
31
|
+
AiSuggestionsRegenerationTriggerValue["SUGGESTION_SELECTED"] = "suggestionSelected";
|
|
32
|
+
AiSuggestionsRegenerationTriggerValue["SUGGESTIONS_UPDATED"] = "suggestionsUpdated";
|
|
33
|
+
return AiSuggestionsRegenerationTriggerValue;
|
|
34
|
+
}({});
|
|
35
|
+
export var AiSuggestionsRegenerationOutcomeValue = /*#__PURE__*/function (AiSuggestionsRegenerationOutcomeValue) {
|
|
36
|
+
AiSuggestionsRegenerationOutcomeValue["REMOVED"] = "removed";
|
|
37
|
+
AiSuggestionsRegenerationOutcomeValue["STILL_STALE"] = "stillStale";
|
|
38
|
+
AiSuggestionsRegenerationOutcomeValue["UPDATED"] = "updated";
|
|
39
|
+
return AiSuggestionsRegenerationOutcomeValue;
|
|
40
|
+
}({});
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Fired when the user clicks the "Try again" / retry button on the suggested
|
|
44
|
+
* edits error screen (the thinking bar's error state). Lets us measure how
|
|
45
|
+
* often users attempt to recover from a suggestions failure.
|
|
46
|
+
*/
|
|
@@ -19,7 +19,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
19
19
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
20
20
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
21
21
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
22
|
-
var packageVersion = "127.
|
|
22
|
+
var packageVersion = "127.2.0";
|
|
23
23
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
24
24
|
// Remove URL as it has UGC
|
|
25
25
|
// Ignored via go/ees007
|
|
@@ -9,8 +9,15 @@ var isEcosystemQuickInsertProviderMenuItemKey = function isEcosystemQuickInsertP
|
|
|
9
9
|
var normalizeQuickInsertProviderMenuItemKey = function normalizeQuickInsertProviderMenuItemKey(key) {
|
|
10
10
|
return isEcosystemQuickInsertProviderMenuItemKey(key) ? "".concat(QUICK_INSERT_PROVIDER_MENU_ITEM_KEY_PREFIX).concat(key.slice("".concat(ECOSYSTEM_QUICK_INSERT_PROVIDER_MENU_ITEM_KEY_PREFIX, "-").length)) : key;
|
|
11
11
|
};
|
|
12
|
+
|
|
13
|
+
/** Reverses `getQuickInsertProviderMenuItemKey`; keys without a provider prefix are returned unchanged. */
|
|
14
|
+
var getQuickInsertProviderMenuItemSourceKey = function getQuickInsertProviderMenuItemSourceKey(key) {
|
|
15
|
+
var normalizedKey = normalizeQuickInsertProviderMenuItemKey(key);
|
|
16
|
+
return normalizedKey.startsWith(QUICK_INSERT_PROVIDER_MENU_ITEM_KEY_PREFIX) ? normalizedKey.slice(QUICK_INSERT_PROVIDER_MENU_ITEM_KEY_PREFIX.length) : key;
|
|
17
|
+
};
|
|
12
18
|
export var quickInsertProviderMenuItemKey = {
|
|
13
19
|
get: getQuickInsertProviderMenuItemKey,
|
|
20
|
+
getSourceKey: getQuickInsertProviderMenuItemSourceKey,
|
|
14
21
|
isEcosystem: isEcosystemQuickInsertProviderMenuItemKey,
|
|
15
22
|
normalize: normalizeQuickInsertProviderMenuItemKey
|
|
16
23
|
};
|
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
1
|
import { ASK_ROVO_MENU_ITEM, EMOJI_MENU_ITEM, HYPERLINK_MENU_ITEM, MEDIA_INSERT_MENU_ITEM, MENTION_MENU_ITEM } from './keys';
|
|
3
2
|
|
|
4
|
-
/** Resolves an item's recommendation
|
|
3
|
+
/** Resolves an item's recommendation, or excludes it with `null`. Lower ranks are shown first. */
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
/** Recommends the given item keys, ranked by their position in the list. */
|
|
6
|
+
export var createIsRecommendedItem = function createIsRecommendedItem(orderedKeys) {
|
|
7
|
+
var ranks = new Map(orderedKeys.map(function (key, index) {
|
|
8
|
+
return [key, index];
|
|
9
|
+
}));
|
|
10
|
+
return function (_ref) {
|
|
11
|
+
var itemKey = _ref.itemKey;
|
|
12
|
+
var rank = ranks.get(itemKey);
|
|
13
|
+
return rank === undefined ? null : {
|
|
14
|
+
rank: rank
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
7
18
|
|
|
8
19
|
/** Default Quick Insert recommendations in their intended display order. */
|
|
9
|
-
export var defaultIsRecommendedItem =
|
|
10
|
-
var _defaultRanks$itemKey;
|
|
11
|
-
var itemKey = _ref.itemKey;
|
|
12
|
-
return (_defaultRanks$itemKey = defaultRanks[itemKey]) !== null && _defaultRanks$itemKey !== void 0 ? _defaultRanks$itemKey : null;
|
|
13
|
-
};
|
|
20
|
+
export var defaultIsRecommendedItem = createIsRecommendedItem([ASK_ROVO_MENU_ITEM.key, HYPERLINK_MENU_ITEM.key, MEDIA_INSERT_MENU_ITEM.key, EMOJI_MENU_ITEM.key, MENTION_MENU_ITEM.key]);
|
|
@@ -168,6 +168,14 @@ export var DATABASE_MENU_ITEM = {
|
|
|
168
168
|
key: 'database-extension:create-database',
|
|
169
169
|
type: 'menu-item'
|
|
170
170
|
};
|
|
171
|
+
export var TABS_MENU_ITEM = {
|
|
172
|
+
key: 'native-tabs:native-tabs',
|
|
173
|
+
type: 'menu-item'
|
|
174
|
+
};
|
|
175
|
+
export var ADD_SUGGESTIONS_TO_CONTENT_SKILL_MENU_ITEM = {
|
|
176
|
+
key: 'skill:add-suggestions-to-content',
|
|
177
|
+
type: 'menu-item'
|
|
178
|
+
};
|
|
171
179
|
export var MENTION_MENU_ITEM = {
|
|
172
180
|
key: 'quick-insert-mention-menu-item',
|
|
173
181
|
type: 'menu-item'
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "127.
|
|
24
|
+
var packageVersion = "127.2.0";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -1,28 +1,47 @@
|
|
|
1
1
|
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
|
|
2
2
|
import type { OperationalAEP, TrackAEP } from './utils';
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
3
|
+
export declare enum AiSuggestionsEntryPointValue {
|
|
4
|
+
PRIMARY_TOOLBAR = "primaryToolbar",
|
|
5
|
+
/**
|
|
6
|
+
* @private
|
|
7
|
+
* @deprecated Legacy entry point retained for backwards compatibility.
|
|
8
|
+
* Use `SUGGESTIONS_PANEL_EMPTY_STATE` for the standalone suggestions panel.
|
|
9
|
+
*/
|
|
10
|
+
COMMENTS_EMPTY_STATE = "commentsEmptyState",
|
|
11
|
+
SUGGESTIONS_PANEL_EMPTY_STATE = "suggestionsPanelEmptyState",
|
|
12
|
+
SUGGESTIONS_PANEL_HEADER = "suggestionsPanelHeader",
|
|
13
|
+
OBJECT_SIDEBAR_CONTROL = "objectSidebarControl",
|
|
14
|
+
/**
|
|
15
|
+
* @private
|
|
16
|
+
* @deprecated Legacy automatic-generation entry point retained for backwards compatibility.
|
|
17
|
+
*/
|
|
18
|
+
SUGGESTIONS_PANEL_MOUNT = "suggestionsPanelMount",
|
|
19
|
+
/** The "Review" button on the follow-up card after the last suggestion is actioned. */
|
|
20
|
+
FOLLOW_UP_CARD = "followUpCard"
|
|
21
|
+
}
|
|
22
|
+
export type AiSuggestionsEntryPoint = `${AiSuggestionsEntryPointValue}`;
|
|
20
23
|
export type AiSuggestionInteractionPoint = 'sidebar' | 'card' | 'statusBar';
|
|
21
|
-
export
|
|
24
|
+
export declare enum AiSuggestionsRightRailEntryPointValue {
|
|
25
|
+
SUGGESTIONS_PANEL = "suggestionsPanel",
|
|
26
|
+
SUGGESTIONS_TAB = "suggestionsTab",// Will be deprecated.
|
|
27
|
+
SUGGESTION_CARD = "suggestionCard"
|
|
28
|
+
}
|
|
29
|
+
export type AiSuggestionsRightRailEntryPoint = `${AiSuggestionsRightRailEntryPointValue}`;
|
|
22
30
|
export type AiSuggestionsEmptyStateType = 'initial' | 'noSuggestionsFound' | 'suggestionsResolved';
|
|
23
31
|
export type AiSuggestionsConversationErrorReason = 'agentDeactivated' | 'agentProvisioning' | 'agentExternalConfigReference' | 'conversationSetup' | 'streamError';
|
|
24
|
-
export
|
|
25
|
-
|
|
32
|
+
export declare enum AiSuggestionsRegenerationTriggerValue {
|
|
33
|
+
PANEL_OPEN = "panelOpen",
|
|
34
|
+
REVIEW_COMPLETED = "reviewCompleted",
|
|
35
|
+
SUGGESTION_SELECTED = "suggestionSelected",
|
|
36
|
+
SUGGESTIONS_UPDATED = "suggestionsUpdated"
|
|
37
|
+
}
|
|
38
|
+
export declare enum AiSuggestionsRegenerationOutcomeValue {
|
|
39
|
+
REMOVED = "removed",
|
|
40
|
+
STILL_STALE = "stillStale",
|
|
41
|
+
UPDATED = "updated"
|
|
42
|
+
}
|
|
43
|
+
export type AiSuggestionsRegenerationTrigger = `${AiSuggestionsRegenerationTriggerValue}`;
|
|
44
|
+
export type AiSuggestionsRegenerationOutcome = `${AiSuggestionsRegenerationOutcomeValue}`;
|
|
26
45
|
type SuggestionRemixAttributes = {
|
|
27
46
|
remixSubtype?: string;
|
|
28
47
|
remixType?: string;
|
|
@@ -78,7 +97,9 @@ type EntryPointClickedAEP = TrackAEP<ACTION.CLICKED, ACTION_SUBJECT.AI_SUGGESTIO
|
|
|
78
97
|
type SuggestionsErrorRetryClickedAEP = TrackAEP<ACTION.CLICKED, ACTION_SUBJECT.AI_SUGGESTIONS, ACTION_SUBJECT_ID.SUGGESTIONS_ERROR_RETRY, undefined, undefined>;
|
|
79
98
|
type EntryPointExposureAEP = TrackAEP<ACTION.EXPOSED, ACTION_SUBJECT.AI_SUGGESTIONS, undefined, {
|
|
80
99
|
entryPoint: AiSuggestionsEntryPoint;
|
|
81
|
-
}, undefined
|
|
100
|
+
}, undefined> & {
|
|
101
|
+
source?: 'objectSidebar';
|
|
102
|
+
};
|
|
82
103
|
type SuggestionLifecycleAttributes = SuggestionRemixAttributes & TimeSinceGenerationAttribute & {
|
|
83
104
|
actionKind: string;
|
|
84
105
|
affectedBlocks: number;
|
|
@@ -4,6 +4,7 @@ type AppProvenance = {
|
|
|
4
4
|
export declare const getQuickInsertProviderMenuItemKey: (key: string, app?: AppProvenance) => string;
|
|
5
5
|
export declare const quickInsertProviderMenuItemKey: {
|
|
6
6
|
get: (key: string, app?: AppProvenance) => string;
|
|
7
|
+
getSourceKey: (key: string) => string;
|
|
7
8
|
isEcosystem: (key: string) => boolean;
|
|
8
9
|
normalize: (key: string) => string;
|
|
9
10
|
};
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
export type IsRecommendedItemOptions = {
|
|
2
|
+
/** Registered key for native items; `manifestKey:moduleKey` for provider and extension items. */
|
|
2
3
|
itemKey: string;
|
|
3
4
|
};
|
|
4
|
-
/** Resolves an item's recommendation
|
|
5
|
-
export type IsRecommendedItemResult =
|
|
5
|
+
/** Resolves an item's recommendation, or excludes it with `null`. Lower ranks are shown first. */
|
|
6
|
+
export type IsRecommendedItemResult = {
|
|
7
|
+
rank: number;
|
|
8
|
+
} | null;
|
|
6
9
|
export type IsRecommendedItem = (options: IsRecommendedItemOptions) => IsRecommendedItemResult;
|
|
10
|
+
/** Recommends the given item keys, ranked by their position in the list. */
|
|
11
|
+
export declare const createIsRecommendedItem: (orderedKeys: readonly string[]) => IsRecommendedItem;
|
|
7
12
|
/** Default Quick Insert recommendations in their intended display order. */
|
|
8
13
|
export declare const defaultIsRecommendedItem: IsRecommendedItem;
|
|
@@ -166,6 +166,14 @@ export declare const DATABASE_MENU_ITEM: {
|
|
|
166
166
|
readonly key: 'database-extension:create-database';
|
|
167
167
|
readonly type: 'menu-item';
|
|
168
168
|
};
|
|
169
|
+
export declare const TABS_MENU_ITEM: {
|
|
170
|
+
readonly key: 'native-tabs:native-tabs';
|
|
171
|
+
readonly type: 'menu-item';
|
|
172
|
+
};
|
|
173
|
+
export declare const ADD_SUGGESTIONS_TO_CONTENT_SKILL_MENU_ITEM: {
|
|
174
|
+
readonly key: 'skill:add-suggestions-to-content';
|
|
175
|
+
readonly type: 'menu-item';
|
|
176
|
+
};
|
|
169
177
|
export declare const MENTION_MENU_ITEM: {
|
|
170
178
|
readonly key: 'quick-insert-mention-menu-item';
|
|
171
179
|
readonly type: 'menu-item';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type Fuse from 'fuse.js';
|
|
2
2
|
import type { IntlShape } from 'react-intl';
|
|
3
3
|
import type { QuickInsertItem, QuickInsertProvider } from '../provider-factory';
|
|
4
|
-
import type { IsRecommendedItem } from '../quick-insert/is-recommended-item';
|
|
5
4
|
import type { EmptyStateHandler } from './empty-state-handler';
|
|
6
5
|
export type QuickInsertOptions = boolean | {
|
|
7
6
|
disableDefaultItems?: boolean;
|
|
@@ -62,7 +61,6 @@ export interface QuickInsertPluginOptions {
|
|
|
62
61
|
* `/` menu. Used by Markdown Mode to allowlist only items whose
|
|
63
62
|
* underlying node/mark has a clean GFM round-trip.
|
|
64
63
|
*/
|
|
65
|
-
isRecommendedItem?: IsRecommendedItem;
|
|
66
64
|
itemFilter?: (item: QuickInsertItem) => boolean;
|
|
67
65
|
onInsert?: (item: QuickInsertItem) => void;
|
|
68
66
|
prioritySortingFn?: (items: QuickInsertItem[]) => Fuse.FuseSortFunction | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "128.0.0",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"@atlaskit/feature-gate-js-client": "^7.0.0",
|
|
55
55
|
"@atlaskit/icon": "^38.0.0",
|
|
56
56
|
"@atlaskit/link": "^5.1.0",
|
|
57
|
-
"@atlaskit/link-datasource": "^7.
|
|
58
|
-
"@atlaskit/link-picker": "^6.
|
|
57
|
+
"@atlaskit/link-datasource": "^7.2.0",
|
|
58
|
+
"@atlaskit/link-picker": "^6.11.0",
|
|
59
59
|
"@atlaskit/logo": "^23.3.0",
|
|
60
60
|
"@atlaskit/media-card": "^82.1.0",
|
|
61
61
|
"@atlaskit/media-client": "^39.0.0",
|
|
@@ -79,13 +79,13 @@
|
|
|
79
79
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
80
80
|
"@atlaskit/react-ufo": "^8.0.0",
|
|
81
81
|
"@atlaskit/section-message": "^10.2.0",
|
|
82
|
-
"@atlaskit/smart-card": "^46.
|
|
83
|
-
"@atlaskit/smart-user-picker": "^12.
|
|
82
|
+
"@atlaskit/smart-card": "^46.4.0",
|
|
83
|
+
"@atlaskit/smart-user-picker": "^12.2.0",
|
|
84
84
|
"@atlaskit/spinner": "^20.4.0",
|
|
85
85
|
"@atlaskit/task-decision": "^21.11.0",
|
|
86
86
|
"@atlaskit/teams-app-config": "^3.1.0",
|
|
87
87
|
"@atlaskit/textfield": "^10.2.0",
|
|
88
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
88
|
+
"@atlaskit/tmp-editor-statsig": "^220.0.0",
|
|
89
89
|
"@atlaskit/tokens": "^20.1.0",
|
|
90
90
|
"@atlaskit/tooltip": "^24.4.0",
|
|
91
91
|
"@atlaskit/width-detector": "^7.2.0",
|