@atlaskit/editor-common 128.3.2 → 129.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 +53 -0
- package/block-node-badges/package.json +10 -0
- package/dist/cjs/analytics/types/enums.js +0 -12
- package/dist/cjs/block-node-badges.js +98 -0
- package/dist/cjs/extensibility/Extension/Extension/index.js +20 -2
- package/dist/cjs/extensibility/Extension/ExtensionCommentBadge.js +110 -0
- package/dist/cjs/media-single/MediaBadges.js +12 -85
- package/dist/cjs/messages/insert-block.js +0 -5
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/quick-insert/snippetMenuRank.js +35 -0
- package/dist/cjs/quick-insert/utils.js +9 -14
- package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +0 -13
- package/dist/cjs/react-node-view/index.js +0 -14
- package/dist/cjs/type-ahead/messages.js +0 -10
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/utils/index.js +0 -47
- package/dist/es2019/analytics/types/enums.js +0 -12
- package/dist/es2019/block-node-badges.js +84 -0
- package/dist/es2019/extensibility/Extension/Extension/index.js +17 -3
- package/dist/es2019/extensibility/Extension/ExtensionCommentBadge.js +60 -0
- package/dist/es2019/media-single/MediaBadges.js +12 -79
- package/dist/es2019/messages/insert-block.js +0 -5
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/quick-insert/snippetMenuRank.js +30 -0
- package/dist/es2019/quick-insert/utils.js +7 -12
- package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +1 -15
- package/dist/es2019/react-node-view/index.js +0 -15
- package/dist/es2019/type-ahead/messages.js +0 -10
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/utils/index.js +0 -5
- package/dist/esm/analytics/types/enums.js +0 -12
- package/dist/esm/block-node-badges.js +88 -0
- package/dist/esm/extensibility/Extension/Extension/index.js +21 -3
- package/dist/esm/extensibility/Extension/ExtensionCommentBadge.js +101 -0
- package/dist/esm/media-single/MediaBadges.js +12 -82
- package/dist/esm/messages/insert-block.js +0 -5
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/quick-insert/snippetMenuRank.js +29 -0
- package/dist/esm/quick-insert/utils.js +9 -14
- package/dist/esm/react-node-view/getInlineNodeViewProducer.js +1 -14
- package/dist/esm/react-node-view/index.js +0 -14
- package/dist/esm/type-ahead/messages.js +0 -10
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/utils/index.js +0 -5
- package/dist/types/analytics/index.d.ts +1 -2
- package/dist/types/analytics/types/enums.d.ts +0 -12
- package/dist/types/analytics/types/events.d.ts +1 -3
- package/dist/types/analytics/types/general-events.d.ts +2 -15
- package/dist/types/block-node-badges.d.ts +14 -0
- package/dist/types/extensibility/Extension/ExtensionCommentBadge.d.ts +8 -0
- package/dist/types/extensibility/types.d.ts +29 -2
- package/dist/types/media-single/MediaBadges.d.ts +4 -8
- package/dist/types/messages/insert-block.d.ts +0 -5
- package/dist/types/quick-insert/snippetMenuRank.d.ts +16 -0
- package/dist/types/type-ahead/messages.d.ts +0 -10
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/types/performance-tracking.d.ts +0 -22
- package/dist/types/types/type-ahead.d.ts +0 -7
- package/dist/types/utils/index.d.ts +0 -5
- package/package.json +7 -3
- package/quick-insert/snippet-menu-rank/package.json +10 -0
- package/analytics/types/performance-report/package.json +0 -10
- package/dist/cjs/analytics/types/performance-report.js +0 -1
- package/dist/cjs/quick-insert/boost-native-results-above-skills.js +0 -61
- package/dist/cjs/utils/get-performance-options.js +0 -65
- package/dist/cjs/utils/performance/TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS.js +0 -10
- package/dist/cjs/utils/performance/TTI_SEVERITY_THRESHOLD_DEFAULTS.js +0 -10
- package/dist/cjs/utils/performance/measure-tti.js +0 -112
- package/dist/cjs/utils/startMeasureReactNodeViewRendered.js +0 -11
- package/dist/es2019/analytics/types/performance-report.js +0 -0
- package/dist/es2019/quick-insert/boost-native-results-above-skills.js +0 -49
- package/dist/es2019/utils/get-performance-options.js +0 -54
- package/dist/es2019/utils/performance/TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS.js +0 -4
- package/dist/es2019/utils/performance/TTI_SEVERITY_THRESHOLD_DEFAULTS.js +0 -4
- package/dist/es2019/utils/performance/measure-tti.js +0 -91
- package/dist/es2019/utils/startMeasureReactNodeViewRendered.js +0 -6
- package/dist/esm/analytics/types/performance-report.js +0 -0
- package/dist/esm/quick-insert/boost-native-results-above-skills.js +0 -54
- package/dist/esm/utils/get-performance-options.js +0 -53
- package/dist/esm/utils/performance/TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS.js +0 -4
- package/dist/esm/utils/performance/TTI_SEVERITY_THRESHOLD_DEFAULTS.js +0 -4
- package/dist/esm/utils/performance/measure-tti.js +0 -94
- package/dist/esm/utils/startMeasureReactNodeViewRendered.js +0 -5
- package/dist/types/analytics/types/performance-report.d.ts +0 -24
- package/dist/types/quick-insert/boost-native-results-above-skills.d.ts +0 -21
- package/dist/types/utils/get-performance-options.d.ts +0 -14
- package/dist/types/utils/performance/TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS.d.ts +0 -4
- package/dist/types/utils/performance/TTI_SEVERITY_THRESHOLD_DEFAULTS.d.ts +0 -4
- package/dist/types/utils/performance/measure-tti.d.ts +0 -8
- package/dist/types/utils/startMeasureReactNodeViewRendered.d.ts +0 -3
- package/performance/measure-tti/package.json +0 -10
- package/utils/get-performance-options/package.json +0 -10
|
@@ -10,7 +10,6 @@ import { ACTION_SUBJECT, ACTION_SUBJECT_ID } from '../analytics';
|
|
|
10
10
|
import { isSSR } from '../core-utils';
|
|
11
11
|
import { createDispatch } from '../event-dispatcher';
|
|
12
12
|
import { ErrorBoundary } from '../ui/ErrorBoundary';
|
|
13
|
-
import { getPerformanceOptions, startMeasureReactNodeViewRendered, stopMeasureReactNodeViewRendered } from '../utils';
|
|
14
13
|
import { analyticsEventKey } from '../utils/analytics';
|
|
15
14
|
import { generateUniqueNodeKey } from './generateUniqueNodeKey';
|
|
16
15
|
export { getInlineNodeViewProducer, inlineNodeViewClassname } from './getInlineNodeViewProducer';
|
|
@@ -88,13 +87,6 @@ var ReactNodeView = /*#__PURE__*/function () {
|
|
|
88
87
|
// nodeView if DOM structure has nested plain "div"s, it doesn't see the
|
|
89
88
|
// difference between them and it kills the nodeView
|
|
90
89
|
this.domRef.classList.add("".concat(this.node.type.name, "View-content-wrap"));
|
|
91
|
-
var _getPerformanceOption = getPerformanceOptions(this.view),
|
|
92
|
-
samplingRate = _getPerformanceOption.samplingRate,
|
|
93
|
-
slowThreshold = _getPerformanceOption.slowThreshold,
|
|
94
|
-
trackingEnabled = _getPerformanceOption.trackingEnabled;
|
|
95
|
-
trackingEnabled && startMeasureReactNodeViewRendered({
|
|
96
|
-
nodeTypeName: this.node.type.name
|
|
97
|
-
});
|
|
98
90
|
if (!shouldSkipInitRender) {
|
|
99
91
|
this.renderReactComponent(function () {
|
|
100
92
|
return _this2.render(_this2.reactComponentProps, _this2.handleRef);
|
|
@@ -115,12 +107,6 @@ var ReactNodeView = /*#__PURE__*/function () {
|
|
|
115
107
|
}
|
|
116
108
|
}
|
|
117
109
|
}
|
|
118
|
-
trackingEnabled && stopMeasureReactNodeViewRendered({
|
|
119
|
-
nodeTypeName: this.node.type.name,
|
|
120
|
-
dispatchAnalyticsEvent: this.dispatchAnalyticsEvent,
|
|
121
|
-
samplingRate: samplingRate,
|
|
122
|
-
slowThreshold: slowThreshold
|
|
123
|
-
});
|
|
124
110
|
return this;
|
|
125
111
|
}
|
|
126
112
|
|
|
@@ -104,15 +104,5 @@ export var typeAheadListMessages = defineMessages({
|
|
|
104
104
|
id: 'fabric.editor.emptySearchResultsSuggestion',
|
|
105
105
|
defaultMessage: 'Select {buttonName} to browse inserts.',
|
|
106
106
|
description: 'a prompt to suggest user to click a button to browse inserts when there are no search results'
|
|
107
|
-
},
|
|
108
|
-
emptySearchResultsSuggestionNew: {
|
|
109
|
-
id: 'fabric.editor.emptySearchResultsSuggestionNew',
|
|
110
|
-
defaultMessage: 'Select {askRovoName} for help, or {buttonName} to browse inserts.',
|
|
111
|
-
description: 'a prompt to suggest user to click a button to browse inserts or ask Rovo for help when there are no search results'
|
|
112
|
-
},
|
|
113
|
-
emptySearchResultsSuggestionAskRovoOnly: {
|
|
114
|
-
id: 'fabric.editor.emptySearchResultsSuggestionAskRovoOnly',
|
|
115
|
-
defaultMessage: 'Select {askRovoName} for help.',
|
|
116
|
-
description: 'a prompt to suggest user to ask Rovo for help when there are no search results and no browse inserts button is available'
|
|
117
107
|
}
|
|
118
108
|
});
|
|
@@ -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 = "128.
|
|
24
|
+
var packageVersion = "128.4.0";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -86,9 +86,6 @@ getDistortedDurationMonitor,
|
|
|
86
86
|
*/
|
|
87
87
|
measureRender } from './performance/measure-render';
|
|
88
88
|
export { startMeasure, stopMeasure, clearMeasure } from './performance/measure';
|
|
89
|
-
export { TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS } from './performance/TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS';
|
|
90
|
-
export { TTI_SEVERITY_THRESHOLD_DEFAULTS } from './performance/TTI_SEVERITY_THRESHOLD_DEFAULTS';
|
|
91
|
-
export { measureTTI, getTTISeverity } from './performance/measure-tti';
|
|
92
89
|
/**
|
|
93
90
|
* @private
|
|
94
91
|
* @deprecated
|
|
@@ -121,8 +118,6 @@ export { isTextInput } from './is-text-input';
|
|
|
121
118
|
export { ZERO_WIDTH_SPACE, ZERO_WIDTH_JOINER } from '../whitespace';
|
|
122
119
|
export { shouldForceTracking } from './should-force-tracking';
|
|
123
120
|
export { getModeFromTheme } from './getModeFromTheme';
|
|
124
|
-
export { getPerformanceOptions, stopMeasureReactNodeViewRendered } from './get-performance-options';
|
|
125
|
-
export { startMeasureReactNodeViewRendered } from './startMeasureReactNodeViewRendered';
|
|
126
121
|
export { sniffUserBrowserExtensions } from './browser-extensions';
|
|
127
122
|
export { RenderCountProfiler, PROFILER_KEY } from './profiler/render-count';
|
|
128
123
|
export { validateADFEntity, validationErrorHandler } from './validate-using-spec';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadCallback, AnalyticsEventPayloadWithChannel, ErrorEventAttributes, ErrorEventPayload, FeatureExposureAEP, FireAnalyticsCallback, FireAnalyticsEvent, FireAnalyticsEventPayload, SimplifiedNode,
|
|
1
|
+
export type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadCallback, AnalyticsEventPayloadWithChannel, ErrorEventAttributes, ErrorEventPayload, FeatureExposureAEP, FireAnalyticsCallback, FireAnalyticsEvent, FireAnalyticsEventPayload, SimplifiedNode, } from './types/events';
|
|
2
2
|
export type { FormatEventPayload } from './types/format-events';
|
|
3
3
|
export type { SubstituteEventPayload } from './types/substitute-events';
|
|
4
4
|
export type { ColorPickerAEP, GeneralEventPayload } from './types/general-events';
|
|
@@ -34,7 +34,6 @@ export type { ToolbarEventPayload } from './types/toolbar-button';
|
|
|
34
34
|
export type { TypeAheadPayload } from './types/type-ahead';
|
|
35
35
|
export { SELECTION_POSITION, SELECTION_TYPE } from './types/utils';
|
|
36
36
|
export type { OperationalAEP } from './types/utils';
|
|
37
|
-
export type { PluginMethodReport, PluginsReport, NodeCount, PluginPerformanceReportData, } from './types/performance-report';
|
|
38
37
|
export type { InitialiseFragmentMarksAEP, ConnectedNodesAEP, DisconnectedSourceAEP, DisconnectedTargetAEP, GotConnectionsAEP, UpdatedFragmentMarkNameAEP, UpdatedSourceAEP, UpdatedTargetAEP, } from './types/referentiality-events';
|
|
39
38
|
export type { ViewInlineCommentsButtonEventAEP, ViewEventPayload } from './types/view-events';
|
|
40
39
|
export type { ExperienceEventPayload } from './types/experience-events';
|
|
@@ -47,14 +47,12 @@ export declare enum ACTION {
|
|
|
47
47
|
DISPLAYED = "displayed",
|
|
48
48
|
DIVERGED = "diverged",
|
|
49
49
|
DISPATCHED_INVALID_TRANSACTION = "dispatchedInvalidTransaction",
|
|
50
|
-
DISPATCHED_VALID_TRANSACTION = "dispatchedValidTransaction",
|
|
51
50
|
DOUBLE_CLICKED = "doubleClicked",
|
|
52
51
|
DRAGGED = "dragged",
|
|
53
52
|
EDITED = "edited",
|
|
54
53
|
EDITOR_CRASHED = "unhandledErrorCaught",
|
|
55
54
|
EDITOR_CRASHED_ADDITIONAL_INFORMATION = "unhandledErrorCaughtAdditionalInfov2",
|
|
56
55
|
EDITOR_MOUNTED = "mounted",
|
|
57
|
-
EDITOR_CONTENT_RETRIEVAL_PERFORMED = "contentRetrievalPerformed",
|
|
58
56
|
RE_RENDERED = "reRendered",
|
|
59
57
|
ENDED = "ended",
|
|
60
58
|
ENTERED = "entered",
|
|
@@ -113,7 +111,6 @@ export declare enum ACTION {
|
|
|
113
111
|
PRESSED = "pressed",
|
|
114
112
|
QUICK_INSERT_INFORMATION = "quickInsertInformation",
|
|
115
113
|
PROSEMIRROR_RENDERED = "proseMirrorRendered",
|
|
116
|
-
REACT_NODEVIEW_RENDERED = "reactNodeViewRendered",
|
|
117
114
|
REFERENCE_SYNCED_BLOCK_DELETE = "referenceSyncedBlockDelete",
|
|
118
115
|
REFERENCE_SYNCED_BLOCK_UPDATE = "referenceSyncedBlockUpdate",
|
|
119
116
|
REFERENCE_SYNCED_BLOCK_UNSYNC = "referenceSyncedBlockUnsync",
|
|
@@ -169,18 +166,9 @@ export declare enum ACTION {
|
|
|
169
166
|
UPLOAD_EXTERNAL_FAIL = "uploadExternalFailed",
|
|
170
167
|
VIEWED = "viewed",
|
|
171
168
|
VISITED = "visited",
|
|
172
|
-
WITH_PLUGIN_STATE_CALLED = "withPluginStateCalled",
|
|
173
169
|
RENDERED = "rendered",
|
|
174
|
-
RENDERED_SAMPLED = "renderedSampled",
|
|
175
170
|
REASONING_VIEWED = "reasoningViewed",
|
|
176
171
|
ON_EDITOR_READY_CALLBACK = "onEditorReadyCallback",
|
|
177
|
-
/**
|
|
178
|
-
* @private
|
|
179
|
-
* @deprecated
|
|
180
|
-
*
|
|
181
|
-
* This is no longer used and can be removed at a later date
|
|
182
|
-
*/
|
|
183
|
-
ON_CHANGE_CALLBACK = "onChangeCalled",
|
|
184
172
|
NESTED_TABLE_TRANSFORMED = "nestedTableTransformed",
|
|
185
173
|
CONTAINER_NODE_TRANSFORMED = "containerNodeTransformed",
|
|
186
174
|
NATIVE_EMBEDS_TRANSFORMED = "nativeEmbedsTransformed",
|
|
@@ -73,7 +73,7 @@ export type SimplifiedNode = {
|
|
|
73
73
|
pos: number;
|
|
74
74
|
type: string;
|
|
75
75
|
};
|
|
76
|
-
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | PasteActionsMenuEventPayload | QuickInsertInformationEventPayload | CutCopyEventPayload | ErrorEventPayload | TextColorEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload |
|
|
76
|
+
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | PasteActionsMenuEventPayload | QuickInsertInformationEventPayload | CutCopyEventPayload | ErrorEventPayload | TextColorEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | PreviewItemClickedAEP | OpenLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | ContainerNodeActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIStreamingEventPayload | AIProactiveEventPayload | AiAutocompleteEventPayload | AiSuggestionsEventPayload | ContextualTypeaheadEventPayload | AIQuickPromptEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | BlockMenuEventPayload | ActiveSessionEventPayload | AIInlineSuggestionPayload | SelectionExtensionEventPayload | TelepointerClickPayload | SelectionToolbarEventPayload | ExperienceEventPayload | AlignmentEventPayload | UndoRedoAEP | OfflineEditingEventPayload | AgentEditShimmerNotShownAEP | FloatingToolbarOverflowEventPayload | SyncBlockEventPayload | FloatingToolbarEventPayload;
|
|
77
77
|
type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
|
|
78
78
|
newColor: string;
|
|
79
79
|
previousColor: string;
|
|
@@ -116,11 +116,9 @@ type InvalidTransactionErrorAEP = OperationalAEP<ACTION.DISPATCHED_INVALID_TRANS
|
|
|
116
116
|
invalidNodes: (SimplifiedNode | string)[];
|
|
117
117
|
isRemoteReplaceDocumentTransaction?: boolean;
|
|
118
118
|
}>;
|
|
119
|
-
type DispatchedValidTransactionAEP = OperationalAEP<ACTION.DISPATCHED_VALID_TRANSACTION, ACTION_SUBJECT.EDITOR, undefined, undefined>;
|
|
120
119
|
type InvalidTransactionStepErrorAEP = OperationalAEP<ACTION.DISCARDED_INVALID_STEPS_FROM_TRANSACTION, ACTION_SUBJECT.EDITOR, undefined, {
|
|
121
120
|
analyticsEventPayloads: AnalyticsEventPayloadWithChannel[];
|
|
122
121
|
}>;
|
|
123
|
-
export type TransactionEventPayload = DispatchedValidTransactionAEP;
|
|
124
122
|
type FailedToUnmountErrorAEP = OperationalAEP<ACTION.FAILED_TO_UNMOUNT, ACTION_SUBJECT.EDITOR, ACTION_SUBJECT_ID.REACT_NODE_VIEW, {
|
|
125
123
|
domNodes: {
|
|
126
124
|
child?: string;
|
|
@@ -36,7 +36,7 @@ type EditorStartAEP = UIAEP<ACTION.STARTED, ACTION_SUBJECT.EDITOR, undefined, {
|
|
|
36
36
|
featureFlags: FeatureFlagKey[];
|
|
37
37
|
platform: PLATFORMS.NATIVE | PLATFORMS.HYBRID | PLATFORMS.WEB;
|
|
38
38
|
}, undefined>;
|
|
39
|
-
type EditorPerfAEP = OperationalAEPWithObjectId<ACTION.EDITOR_MOUNTED | ACTION.PROSEMIRROR_RENDERED | ACTION.ON_EDITOR_READY_CALLBACK
|
|
39
|
+
type EditorPerfAEP = OperationalAEPWithObjectId<ACTION.EDITOR_MOUNTED | ACTION.PROSEMIRROR_RENDERED | ACTION.ON_EDITOR_READY_CALLBACK, ACTION_SUBJECT.EDITOR, undefined, {
|
|
40
40
|
distortedDuration?: boolean;
|
|
41
41
|
duration: number;
|
|
42
42
|
editorDomSize?: number;
|
|
@@ -49,11 +49,6 @@ type EditorPerfAEP = OperationalAEPWithObjectId<ACTION.EDITOR_MOUNTED | ACTION.P
|
|
|
49
49
|
totalNodes?: number;
|
|
50
50
|
ttfb?: number;
|
|
51
51
|
}>;
|
|
52
|
-
type EditorContentRetrievalPerformedAEP = OperationalAEP<ACTION.EDITOR_CONTENT_RETRIEVAL_PERFORMED, ACTION_SUBJECT.EDITOR, undefined, {
|
|
53
|
-
errorInfo?: string;
|
|
54
|
-
errorStack?: string;
|
|
55
|
-
success: boolean;
|
|
56
|
-
}>;
|
|
57
52
|
type EditorRenderedAEP<T> = OperationalAEP<ACTION.RE_RENDERED, ACTION_SUBJECT.EDITOR | ACTION_SUBJECT.REACT_EDITOR_VIEW, undefined, {
|
|
58
53
|
count: number;
|
|
59
54
|
propsDifference: PropsDifference<T> | ShallowPropsDifference<T>;
|
|
@@ -132,14 +127,6 @@ type InputPerfSamplingAvgAEP = OperationalAEPWithObjectId<ACTION.INPUT_PERF_SAMP
|
|
|
132
127
|
type TransactionMutatedAEP = OperationalAEP<ACTION.TRANSACTION_MUTATED_AFTER_DISPATCH, ACTION_SUBJECT.EDITOR, undefined, {
|
|
133
128
|
pluginKey: string;
|
|
134
129
|
}>;
|
|
135
|
-
type WithPluginStateCalledAEP = OperationalAEP<ACTION.WITH_PLUGIN_STATE_CALLED, ACTION_SUBJECT.EDITOR, undefined, {
|
|
136
|
-
duration: number;
|
|
137
|
-
plugin: string;
|
|
138
|
-
}>;
|
|
139
|
-
type ReactNodeViewRenderedAEP = OperationalAEP<ACTION.REACT_NODEVIEW_RENDERED, ACTION_SUBJECT.EDITOR, undefined, {
|
|
140
|
-
duration: number;
|
|
141
|
-
node: string;
|
|
142
|
-
}>;
|
|
143
130
|
type UploadExternalFailedAEP = OperationalAEP<ACTION.UPLOAD_EXTERNAL_FAIL, ACTION_SUBJECT.EDITOR, undefined, undefined>;
|
|
144
131
|
type InvalidProsemirrorDocumentErrorAEP = OperationalAEP<ACTION.INVALID_PROSEMIRROR_DOCUMENT, ACTION_SUBJECT.EDITOR, undefined, undefined>;
|
|
145
132
|
type DocumentProcessingErrorAEP = OperationalAEP<ACTION.DOCUMENT_PROCESSING_ERROR, ACTION_SUBJECT.EDITOR, undefined, {
|
|
@@ -311,5 +298,5 @@ type ChangeToneMenuItemClickedAEP = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.TOOLBAR
|
|
|
311
298
|
type TranslateMenuItemClickedAEP = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.TOOLBAR_DROPDOWN_MENU_ITEM, ACTION_SUBJECT_ID.AI_TRANSLATE, {
|
|
312
299
|
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB;
|
|
313
300
|
}>;
|
|
314
|
-
export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | AnnotationErrorAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ButtonUploadMediaAEP | ColorPickerAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamplingAEP | InputPerfSamplingAvgAEP | LimitedModeLatchedAEP | PickerEmojiAEP | PickerImageAEP | PickerMediaInsertAEP | PickerMediaInsertTabViewedAEP | PickerMediaInsertImageGenerationSubmittedAEP | PickerMediaInsertClosedAEP | PickerMediaInsertCancelledAEP |
|
|
301
|
+
export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | AnnotationErrorAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ButtonUploadMediaAEP | ColorPickerAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamplingAEP | InputPerfSamplingAvgAEP | LimitedModeLatchedAEP | PickerEmojiAEP | PickerImageAEP | PickerMediaInsertAEP | PickerMediaInsertTabViewedAEP | PickerMediaInsertImageGenerationSubmittedAEP | PickerMediaInsertClosedAEP | PickerMediaInsertCancelledAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | CodeBlockLanguageAutoDetectedAEP | CodeBlockLanguageSelectedAEP | CodeBlockFormatCodeSuccessAEP | CodeBlockFormatCodeFailedAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP | InvalidMediaContentTransformedAEP | HeadingAnchorLinkButtonAEP | CollabStepsTrackerPayloadAEP | CollabOrganicChangesTrackerPayloadAEP | BlocksDragInitAEP | CodeBlockFoldingToggleAEP | CodeBlockWordWrapToggleAEP | CodeBlockLineNumbersToggleAEP | RequestToEditAEP | SingleColumLayoutDetectedAEP | CopyLinkToAnchorButtonAEP | DockedPrimaryToolbarRenderedAEP | RovoMoreOptionsClickedAEP | AskRovoButtonClickedAEP | SmartLinkRovoButtonClickedAEP | SmartLinkSummarizeButtonClickedAEP | AIRemixButtonClickedAEP | ChangeToneMenuItemClickedAEP | TranslateMenuItemClickedAEP | MediaSingleWidthTransformedAEP;
|
|
315
302
|
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
type BlockNodeBadgesProps = {
|
|
4
|
+
children: ReactNode | ((props: {
|
|
5
|
+
visible: boolean;
|
|
6
|
+
}) => ReactNode);
|
|
7
|
+
element?: HTMLElement | null;
|
|
8
|
+
extendedResizeOffset?: boolean;
|
|
9
|
+
height?: number;
|
|
10
|
+
useMinimumZIndex?: boolean;
|
|
11
|
+
width?: number;
|
|
12
|
+
};
|
|
13
|
+
export declare const BlockNodeBadges: ({ children, element, width, height, extendedResizeOffset, useMinimumZIndex, }: BlockNodeBadgesProps) => React.JSX.Element | null;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { OptionalPlugin, PublicPluginAPI } from '../../types';
|
|
3
|
+
import type { ExtensionAnnotationPlugin, ExtensionCommentBadgeProps } from '../types';
|
|
4
|
+
type Props = ExtensionCommentBadgeProps & {
|
|
5
|
+
api: PublicPluginAPI<[OptionalPlugin<ExtensionAnnotationPlugin>]> | undefined;
|
|
6
|
+
};
|
|
7
|
+
export declare const ExtensionCommentBadge: ({ api, editorView, node, getPos, container, }: Props) => React.JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -1,9 +1,36 @@
|
|
|
1
1
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type {
|
|
2
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
+
import type { VIEW_METHOD } from '../analytics';
|
|
4
|
+
import type { EditorContainerWidth, Command, NextEditorPlugin, OptionalPlugin, PublicPluginAPI } from '../types';
|
|
5
|
+
export type ExtensionCommentBadgeProps = {
|
|
6
|
+
container: HTMLElement;
|
|
7
|
+
editorView: EditorView;
|
|
8
|
+
getPos: () => number | undefined;
|
|
9
|
+
node: Node;
|
|
10
|
+
};
|
|
11
|
+
export type ExtensionAnnotationPlugin = NextEditorPlugin<'annotation', {
|
|
12
|
+
actions: {
|
|
13
|
+
isBlockNodeSupported: (node: Node) => boolean;
|
|
14
|
+
requestCloseInlineComment: () => Promise<boolean>;
|
|
15
|
+
showCommentForBlockNode: (node: Node, viewMethod: VIEW_METHOD) => Command;
|
|
16
|
+
};
|
|
17
|
+
sharedState: {
|
|
18
|
+
annotations: {
|
|
19
|
+
[id: string]: boolean | undefined;
|
|
20
|
+
};
|
|
21
|
+
isDrafting: boolean;
|
|
22
|
+
isInlineCommentViewClosed: boolean;
|
|
23
|
+
isVisible: boolean;
|
|
24
|
+
selectedAnnotations: {
|
|
25
|
+
id: string;
|
|
26
|
+
}[];
|
|
27
|
+
targetNodeId?: string;
|
|
28
|
+
} | undefined;
|
|
29
|
+
}>;
|
|
3
30
|
type WidthPluginType = NextEditorPlugin<'width', {
|
|
4
31
|
sharedState: EditorContainerWidth | undefined;
|
|
5
32
|
}>;
|
|
6
|
-
export type ExtensionsPluginInjectionAPI = PublicPluginAPI<[WidthPluginType]> | undefined;
|
|
33
|
+
export type ExtensionsPluginInjectionAPI = PublicPluginAPI<[WidthPluginType, OptionalPlugin<ExtensionAnnotationPlugin>]> | undefined;
|
|
7
34
|
export type MacroInteractionDesignFeatureFlags = {
|
|
8
35
|
showMacroInteractionDesignUpdates?: boolean;
|
|
9
36
|
};
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
type
|
|
4
|
-
children: ReactNode | ((props: {
|
|
5
|
-
visible: boolean;
|
|
6
|
-
}) => ReactNode);
|
|
7
|
-
extendedResizeOffset?: boolean;
|
|
2
|
+
import { BlockNodeBadges } from '../block-node-badges';
|
|
3
|
+
type Props = Omit<React.ComponentProps<typeof BlockNodeBadges>, 'element' | 'width' | 'height'> & {
|
|
8
4
|
mediaElement?: HTMLElement | null;
|
|
9
5
|
mediaHeight?: number;
|
|
10
6
|
mediaWidth?: number;
|
|
11
|
-
useMinimumZIndex?: boolean;
|
|
12
7
|
};
|
|
13
|
-
|
|
8
|
+
/** Compatibility wrapper for existing media consumers of BlockNodeBadges. */
|
|
9
|
+
export declare const MediaBadges: ({ mediaElement, mediaWidth, mediaHeight, children, extendedResizeOffset, useMinimumZIndex, }: Props) => React.JSX.Element;
|
|
14
10
|
export {};
|
|
@@ -39,11 +39,6 @@ export declare const toolbarInsertBlockMessages: {
|
|
|
39
39
|
description: string;
|
|
40
40
|
id: string;
|
|
41
41
|
};
|
|
42
|
-
askRovo: {
|
|
43
|
-
defaultMessage: string;
|
|
44
|
-
description: string;
|
|
45
|
-
id: string;
|
|
46
|
-
};
|
|
47
42
|
closeInsertRightRail: {
|
|
48
43
|
defaultMessage: string;
|
|
49
44
|
description: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type SnippetMenuRankInput = {
|
|
2
|
+
insertCount?: number;
|
|
3
|
+
isFavorite: boolean;
|
|
4
|
+
scope: 'GLOBAL' | 'SITE' | 'USER';
|
|
5
|
+
updatedAt: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const TEMPLATE_GALLERY_MENU_RANK = 0;
|
|
8
|
+
/**
|
|
9
|
+
* Menu rank for a Block template within the Block templates section. Lower ranks appear first.
|
|
10
|
+
* Each rank is its tier plus a fraction in [0, 1), so tiers never overlap.
|
|
11
|
+
*
|
|
12
|
+
* Negative ranks are intentional and valid. This is a `parents[].rank` sort key, not a Fuse score:
|
|
13
|
+
* the registry menu compares ranks by subtraction, and Fuse's 0–1 `score` is a separate value that
|
|
14
|
+
* is compared first when searching, so rank only orders templates with equal scores.
|
|
15
|
+
*/
|
|
16
|
+
export declare const getSnippetMenuRank: ({ insertCount, isFavorite, scope, updatedAt, }: SnippetMenuRankInput) => number;
|
|
@@ -29,16 +29,6 @@ export declare const typeAheadListMessages: {
|
|
|
29
29
|
description: string;
|
|
30
30
|
id: string;
|
|
31
31
|
};
|
|
32
|
-
emptySearchResultsSuggestionAskRovoOnly: {
|
|
33
|
-
defaultMessage: string;
|
|
34
|
-
description: string;
|
|
35
|
-
id: string;
|
|
36
|
-
};
|
|
37
|
-
emptySearchResultsSuggestionNew: {
|
|
38
|
-
defaultMessage: string;
|
|
39
|
-
description: string;
|
|
40
|
-
id: string;
|
|
41
|
-
};
|
|
42
32
|
inputQueryAssistiveLabel: {
|
|
43
33
|
defaultMessage: string;
|
|
44
34
|
description: string;
|
|
@@ -34,7 +34,7 @@ export type { EditorCommand, EditorCommandWithMetadata } from './editor-command'
|
|
|
34
34
|
export type IconProps = {
|
|
35
35
|
label?: string;
|
|
36
36
|
};
|
|
37
|
-
export type { TTITracking, TransactionTracking, UITracking, CatchAllTracking,
|
|
37
|
+
export type { TTITracking, TransactionTracking, UITracking, CatchAllTracking, BrowserFreezetracking, ProseMirrorRenderedTracking, InputTracking, ContentRetrievalTracking, OnChangeCallbackTracking, OnEditorReadyCallbackTracking, PasteTracking, RenderTracking, PerformanceTracking, } from './performance-tracking';
|
|
38
38
|
export type { GridType } from './grid';
|
|
39
39
|
export type { LinkInputType, LinkPickerOptions, LinkingOptions, HyperlinkPluginOptions, } from './hyperlink';
|
|
40
40
|
export type { SnapPointsProps } from './resizable-media-single';
|
|
@@ -96,24 +96,6 @@ export type CatchAllTracking = {
|
|
|
96
96
|
*/
|
|
97
97
|
enabled: boolean;
|
|
98
98
|
};
|
|
99
|
-
export type NodeViewTracking = {
|
|
100
|
-
/**
|
|
101
|
-
* @description Control whether
|
|
102
|
-
NodeView performance is tracked. When this is false no measurements are taken and no events are sent.
|
|
103
|
-
* @default false
|
|
104
|
-
*/
|
|
105
|
-
enabled: boolean;
|
|
106
|
-
/**
|
|
107
|
-
* @description The nth re-render of NodeView after which an analytics event is sent. Depends on enabled being true.
|
|
108
|
-
* @default false
|
|
109
|
-
*/
|
|
110
|
-
samplingRate?: 100;
|
|
111
|
-
/**
|
|
112
|
-
* @description NodeView render that exceeds the threshold generate analytics event. Depends on enabled being true.
|
|
113
|
-
* @default 7
|
|
114
|
-
*/
|
|
115
|
-
slowThreshold?: number;
|
|
116
|
-
};
|
|
117
99
|
export type BrowserFreezetracking = {
|
|
118
100
|
enabled?: boolean;
|
|
119
101
|
/**
|
|
@@ -296,10 +278,6 @@ export type PerformanceTracking = {
|
|
|
296
278
|
* @description Control whether transactions are tracked
|
|
297
279
|
*/
|
|
298
280
|
inputTracking?: InputTracking;
|
|
299
|
-
/**
|
|
300
|
-
* @description Control whether nodeviews are tracked
|
|
301
|
-
*/
|
|
302
|
-
nodeViewTracking?: NodeViewTracking;
|
|
303
281
|
/**
|
|
304
282
|
* @description Control whether browser freezes / long tasks are tracked
|
|
305
283
|
*/
|
|
@@ -126,13 +126,6 @@ export type TypeAheadHandler = {
|
|
|
126
126
|
}) => void;
|
|
127
127
|
/** Handler returns typeahead item based on query. Used to find which item to insert. */
|
|
128
128
|
forceSelect?: TypeAheadForceSelect;
|
|
129
|
-
/**
|
|
130
|
-
* Optional handler that returns an item (Ask Rovo) to display in the typeahead's
|
|
131
|
-
* empty-results state.
|
|
132
|
-
*/
|
|
133
|
-
getEmptyItem?: (props: {
|
|
134
|
-
editorState: EditorState;
|
|
135
|
-
}) => TypeAheadItem | undefined;
|
|
136
129
|
getHighlight?: (state: EditorState) => JSX.Element | null;
|
|
137
130
|
/** Handler returns an array of TypeAheadItem based on query to be displayed in the TypeAhead */
|
|
138
131
|
getItems: (props: {
|
|
@@ -91,9 +91,6 @@ getDistortedDurationMonitor,
|
|
|
91
91
|
*/
|
|
92
92
|
measureRender, } from './performance/measure-render';
|
|
93
93
|
export { startMeasure, stopMeasure, clearMeasure } from './performance/measure';
|
|
94
|
-
export { TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS } from './performance/TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS';
|
|
95
|
-
export { TTI_SEVERITY_THRESHOLD_DEFAULTS } from './performance/TTI_SEVERITY_THRESHOLD_DEFAULTS';
|
|
96
|
-
export { measureTTI, getTTISeverity } from './performance/measure-tti';
|
|
97
94
|
/**
|
|
98
95
|
* @private
|
|
99
96
|
* @deprecated
|
|
@@ -126,8 +123,6 @@ export { ZERO_WIDTH_SPACE, ZERO_WIDTH_JOINER } from '../whitespace';
|
|
|
126
123
|
export type { Diff } from './types';
|
|
127
124
|
export { shouldForceTracking } from './should-force-tracking';
|
|
128
125
|
export { getModeFromTheme } from './getModeFromTheme';
|
|
129
|
-
export { getPerformanceOptions, stopMeasureReactNodeViewRendered } from './get-performance-options';
|
|
130
|
-
export { startMeasureReactNodeViewRendered } from './startMeasureReactNodeViewRendered';
|
|
131
126
|
export type { UserBrowserExtensionResults } from './browser-extensions';
|
|
132
127
|
export { sniffUserBrowserExtensions } from './browser-extensions';
|
|
133
128
|
export { RenderCountProfiler, PROFILER_KEY } from './profiler/render-count';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "129.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/"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@atlaskit/activity-provider": "^3.1.0",
|
|
32
|
-
"@atlaskit/adf-schema": "^57.
|
|
32
|
+
"@atlaskit/adf-schema": "^57.7.0",
|
|
33
33
|
"@atlaskit/adf-utils": "^20.9.0",
|
|
34
34
|
"@atlaskit/afm-i18n-platform-editor-editor-common": "2.270.0",
|
|
35
35
|
"@atlaskit/analytics-listeners": "^11.4.0",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@atlaskit/profilecard": "^27.1.0",
|
|
78
78
|
"@atlaskit/prosemirror-history": "^1.3.0",
|
|
79
79
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
80
|
-
"@atlaskit/react-ufo": "^8.
|
|
80
|
+
"@atlaskit/react-ufo": "^8.1.0",
|
|
81
81
|
"@atlaskit/section-message": "^10.2.0",
|
|
82
82
|
"@atlaskit/smart-card": "^46.5.0",
|
|
83
83
|
"@atlaskit/smart-user-picker": "^12.3.0",
|
|
@@ -146,6 +146,10 @@
|
|
|
146
146
|
"sinon": "^2.2.0"
|
|
147
147
|
},
|
|
148
148
|
"platform-feature-flags": {
|
|
149
|
+
"cc_maui_annotations_on_extensions": {
|
|
150
|
+
"type": "boolean",
|
|
151
|
+
"referenceOnly": true
|
|
152
|
+
},
|
|
149
153
|
"platform_editor_mention_avatar_observability": {
|
|
150
154
|
"type": "boolean",
|
|
151
155
|
"referenceOnly": true
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-common/quick-insert/snippet-menu-rank",
|
|
3
|
+
"main": "../../dist/cjs/quick-insert/snippetMenuRank.js",
|
|
4
|
+
"module": "../../dist/esm/quick-insert/snippetMenuRank.js",
|
|
5
|
+
"module:es2019": "../../dist/es2019/quick-insert/snippetMenuRank.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../../dist/types/quick-insert/snippetMenuRank.d.ts"
|
|
10
|
+
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@atlaskit/editor-common/analytics/types/performance-report",
|
|
3
|
-
"main": "../../../dist/cjs/analytics/types/performance-report.js",
|
|
4
|
-
"module": "../../../dist/esm/analytics/types/performance-report.js",
|
|
5
|
-
"module:es2019": "../../../dist/es2019/analytics/types/performance-report.js",
|
|
6
|
-
"sideEffects": [
|
|
7
|
-
"**/*.compiled.css"
|
|
8
|
-
],
|
|
9
|
-
"types": "../../../dist/types/analytics/types/performance-report.d.ts"
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.boostNativeResultsAboveSkills = boostNativeResultsAboveSkills;
|
|
8
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
-
var SCORE_PROXIMITY_THRESHOLD = 0.2;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* The extension type for Rovo skills, used to identify skill items in the
|
|
13
|
-
* quick insert menu. Matches the value defined in
|
|
14
|
-
* @atlassian/conversation-assistant-content-transformer/utils/skills.
|
|
15
|
-
*
|
|
16
|
-
* Intentionally duplicated here to avoid adding a runtime dependency from
|
|
17
|
-
* editor-common to the conversation-assistant packages.
|
|
18
|
-
*/
|
|
19
|
-
var ROVO_SKILL_EXTENSION_TYPE = 'com.atlassian.rovo.skill';
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Promotes native editor elements above Rovo skill items in search results
|
|
23
|
-
* when their Fuse scores are close.
|
|
24
|
-
*
|
|
25
|
-
* An item is classified as a Rovo skill when its `extensionType` property
|
|
26
|
-
* (set by `buildMenuItem` for all extension manifest items) matches the
|
|
27
|
-
* Rovo skill extension type. Native editor items (Link, Code snippet, Table,
|
|
28
|
-
* etc.) and other non-Rovo extensions are unaffected, regardless of their
|
|
29
|
-
* priority value.
|
|
30
|
-
*
|
|
31
|
-
* When a skill and a native item have similar scores (within the proximity
|
|
32
|
-
* threshold), the native item is promoted above the skill. But when a skill
|
|
33
|
-
* is a significantly better match (e.g. searching "research" and the skill is
|
|
34
|
-
* "Research Insights" while the native item is "Live search"), the skill keeps
|
|
35
|
-
* its higher rank.
|
|
36
|
-
*/
|
|
37
|
-
function boostNativeResultsAboveSkills(results) {
|
|
38
|
-
var isSkill = function isSkill(r) {
|
|
39
|
-
return r.item.extensionType === ROVO_SKILL_EXTENSION_TYPE;
|
|
40
|
-
};
|
|
41
|
-
var reordered = results.slice(0);
|
|
42
|
-
for (var i = 1; i < reordered.length; i++) {
|
|
43
|
-
if (isSkill(reordered[i])) {
|
|
44
|
-
continue;
|
|
45
|
-
}
|
|
46
|
-
// reordered[i] is a native item — check if there are skills
|
|
47
|
-
// ranked above it that have a similar score.
|
|
48
|
-
var insertAt = i;
|
|
49
|
-
while (insertAt > 0 && isSkill(reordered[insertAt - 1]) && Math.abs(((_reordered$score = reordered[insertAt - 1].score) !== null && _reordered$score !== void 0 ? _reordered$score : 0) - ((_reordered$i$score = reordered[i].score) !== null && _reordered$i$score !== void 0 ? _reordered$i$score : 0)) < SCORE_PROXIMITY_THRESHOLD) {
|
|
50
|
-
var _reordered$score, _reordered$i$score;
|
|
51
|
-
insertAt--;
|
|
52
|
-
}
|
|
53
|
-
if (insertAt < i) {
|
|
54
|
-
var _reordered$splice = reordered.splice(i, 1),
|
|
55
|
-
_reordered$splice2 = (0, _slicedToArray2.default)(_reordered$splice, 1),
|
|
56
|
-
native = _reordered$splice2[0];
|
|
57
|
-
reordered.splice(insertAt, 0, native);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
return reordered;
|
|
61
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getPerformanceOptions = getPerformanceOptions;
|
|
7
|
-
Object.defineProperty(exports, "startMeasureReactNodeViewRendered", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function get() {
|
|
10
|
-
return _startMeasureReactNodeViewRendered.startMeasureReactNodeViewRendered;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
exports.stopMeasureReactNodeViewRendered = stopMeasureReactNodeViewRendered;
|
|
14
|
-
var _analytics = require("../analytics");
|
|
15
|
-
var _performanceMeasures = require("../performance-measures");
|
|
16
|
-
var _startMeasureReactNodeViewRendered = require("./startMeasureReactNodeViewRendered");
|
|
17
|
-
// This was existing logic when converting from ReactNodeView
|
|
18
|
-
// our current sampling for this event is not bound by node.type
|
|
19
|
-
var nodeViewRenderedEventsCounter = 0;
|
|
20
|
-
var DEFAULT_SAMPLING_RATE = 100;
|
|
21
|
-
var DEFAULT_SLOW_THRESHOLD = 7;
|
|
22
|
-
function getPerformanceOptions(view) {
|
|
23
|
-
var _nodeViewTracking$sam, _nodeViewTracking$slo;
|
|
24
|
-
// Please, do not copy or use this kind of code below
|
|
25
|
-
// @ts-ignore
|
|
26
|
-
var fakePluginKey = {
|
|
27
|
-
key: 'analyticsPlugin$',
|
|
28
|
-
getState: function getState(state) {
|
|
29
|
-
// Ignored via go/ees005
|
|
30
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
31
|
-
return state['analyticsPlugin$'];
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
var pluginState = fakePluginKey.getState(view.state);
|
|
35
|
-
var nodeViewTracking = pluginState && pluginState.performanceTracking ? pluginState.performanceTracking.nodeViewTracking || {} : {};
|
|
36
|
-
var samplingRate = (_nodeViewTracking$sam = nodeViewTracking.samplingRate) !== null && _nodeViewTracking$sam !== void 0 ? _nodeViewTracking$sam : DEFAULT_SAMPLING_RATE;
|
|
37
|
-
var slowThreshold = (_nodeViewTracking$slo = nodeViewTracking.slowThreshold) !== null && _nodeViewTracking$slo !== void 0 ? _nodeViewTracking$slo : DEFAULT_SLOW_THRESHOLD;
|
|
38
|
-
return {
|
|
39
|
-
trackingEnabled: !!nodeViewTracking.enabled,
|
|
40
|
-
samplingRate: samplingRate,
|
|
41
|
-
slowThreshold: slowThreshold
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
46
|
-
function stopMeasureReactNodeViewRendered(_ref) {
|
|
47
|
-
var nodeTypeName = _ref.nodeTypeName,
|
|
48
|
-
dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent,
|
|
49
|
-
samplingRate = _ref.samplingRate,
|
|
50
|
-
slowThreshold = _ref.slowThreshold;
|
|
51
|
-
(0, _performanceMeasures.stopMeasure)("\uD83E\uDD89".concat(nodeTypeName, "::ReactNodeView"), function (duration) {
|
|
52
|
-
if (++nodeViewRenderedEventsCounter % samplingRate === 0 && duration > slowThreshold) {
|
|
53
|
-
dispatchAnalyticsEvent({
|
|
54
|
-
action: _analytics.ACTION.REACT_NODEVIEW_RENDERED,
|
|
55
|
-
actionSubject: _analytics.ACTION_SUBJECT.EDITOR,
|
|
56
|
-
eventType: _analytics.EVENT_TYPE.OPERATIONAL,
|
|
57
|
-
attributes: {
|
|
58
|
-
node: nodeTypeName,
|
|
59
|
-
duration: duration
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
// eslint-disable-next-line @atlaskit/editor/no-re-export
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS = void 0;
|
|
7
|
-
var TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS = exports.TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS = {
|
|
8
|
-
NORMAL: 5000,
|
|
9
|
-
DEGRADED: 8000
|
|
10
|
-
};
|