@atlaskit/editor-common 70.2.1 → 71.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 +50 -0
- package/dist/cjs/analytics/types/enums.js +10 -1
- package/dist/cjs/keymaps/index.js +5 -8
- package/dist/cjs/messages/insert-block.js +12 -7
- package/dist/cjs/panel.js +6 -0
- package/dist/cjs/styles/shared/code-block.js +5 -5
- package/dist/cjs/styles/shared/panel.js +54 -17
- package/dist/cjs/styles/shared/table.js +12 -7
- package/dist/cjs/styles/shared/text-color.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui-color/ColorPalette/Color/index.js +6 -2
- package/dist/cjs/ui-color/ColorPalette/index.js +21 -11
- package/dist/cjs/ui-menu/Dropdown/index.js +16 -2
- package/dist/cjs/ui-menu/DropdownMenu/index.js +27 -8
- package/dist/cjs/ui-menu/MenuArrowKeyNavigationProvider/index.js +162 -0
- package/dist/cjs/ui-react/with-react-editor-view-outer-listeners.js +22 -13
- package/dist/cjs/utils/index.js +6 -0
- package/dist/cjs/utils/performance/measure-render.js +44 -23
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/analytics/types/enums.js +10 -1
- package/dist/es2019/keymaps/index.js +4 -6
- package/dist/es2019/messages/insert-block.js +12 -7
- package/dist/es2019/panel.js +1 -1
- package/dist/es2019/styles/shared/code-block.js +39 -25
- package/dist/es2019/styles/shared/panel.js +48 -18
- package/dist/es2019/styles/shared/table.js +24 -13
- package/dist/es2019/styles/shared/text-color.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui-color/ColorPalette/Color/index.js +6 -3
- package/dist/es2019/ui-color/ColorPalette/index.js +19 -11
- package/dist/es2019/ui-menu/Dropdown/index.js +13 -2
- package/dist/es2019/ui-menu/DropdownMenu/index.js +41 -6
- package/dist/es2019/ui-menu/MenuArrowKeyNavigationProvider/index.js +146 -0
- package/dist/es2019/ui-react/with-react-editor-view-outer-listeners.js +20 -13
- package/dist/es2019/utils/index.js +1 -1
- package/dist/es2019/utils/performance/measure-render.js +43 -23
- package/dist/es2019/version.json +1 -1
- package/dist/esm/analytics/types/enums.js +10 -1
- package/dist/esm/keymaps/index.js +3 -6
- package/dist/esm/messages/insert-block.js +12 -7
- package/dist/esm/panel.js +1 -1
- package/dist/esm/styles/shared/code-block.js +5 -5
- package/dist/esm/styles/shared/panel.js +49 -18
- package/dist/esm/styles/shared/table.js +12 -9
- package/dist/esm/styles/shared/text-color.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui-color/ColorPalette/Color/index.js +5 -2
- package/dist/esm/ui-color/ColorPalette/index.js +20 -11
- package/dist/esm/ui-menu/Dropdown/index.js +15 -2
- package/dist/esm/ui-menu/DropdownMenu/index.js +28 -9
- package/dist/esm/ui-menu/MenuArrowKeyNavigationProvider/index.js +147 -0
- package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +22 -13
- package/dist/esm/utils/index.js +1 -1
- package/dist/esm/utils/performance/measure-render.js +42 -23
- package/dist/esm/version.json +1 -1
- package/dist/types/analytics/index.d.ts +1 -1
- package/dist/types/analytics/types/enums.d.ts +18 -1
- package/dist/types/analytics/types/general-events.d.ts +2 -1
- package/dist/types/analytics/types/index.d.ts +1 -0
- package/dist/types/analytics/types/referentiality-events.d.ts +47 -4
- package/dist/types/keymaps/index.d.ts +0 -1
- package/dist/types/messages/insert-block.d.ts +7 -2
- package/dist/types/panel.d.ts +1 -1
- package/dist/types/styles/shared/code-block.d.ts +1 -0
- package/dist/types/styles/shared/panel.d.ts +1 -0
- package/dist/types/types/feature-flags.d.ts +27 -6
- package/dist/types/types/floating-toolbar.d.ts +4 -0
- package/dist/types/ui-color/ColorPalette/Color/index.d.ts +5 -0
- package/dist/types/ui-color/ColorPalette/index.d.ts +8 -0
- package/dist/types/ui-menu/Dropdown/index.d.ts +3 -0
- package/dist/types/ui-menu/DropdownMenu/index.d.ts +1 -0
- package/dist/types/ui-menu/DropdownMenu/types.d.ts +7 -0
- package/dist/types/ui-menu/MenuArrowKeyNavigationProvider/index.d.ts +15 -0
- package/dist/types/ui-react/with-react-editor-view-outer-listeners.d.ts +2 -0
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/types/utils/performance/measure-render.d.ts +12 -0
- package/package.json +8 -7
- package/report.api.md +12 -5
|
@@ -1,4 +1,40 @@
|
|
|
1
1
|
import { isPerformanceAPIAvailable } from './is-performance-api-available';
|
|
2
|
+
/**
|
|
3
|
+
* Monitors if a pages enters a visibility state which will lead to
|
|
4
|
+
* distorted duration measurements (where the measurement uses the
|
|
5
|
+
* requestAnimationFrame api).
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export function getDistortedDurationMonitor() {
|
|
9
|
+
// If an editor is rendered when the document is not visible -- the callback passed to
|
|
10
|
+
// requestAnimationFrame will not fire until the document becomes visible again.
|
|
11
|
+
//
|
|
12
|
+
// For the purposes of using performance measurement -- this behaviour means the events
|
|
13
|
+
// which have been fired in the background are not useful -- and lead to other events
|
|
14
|
+
// being hard to draw conclusions from.
|
|
15
|
+
//
|
|
16
|
+
// To mitigate this -- we detect this state -- and fire a seperate callback when the
|
|
17
|
+
// measurement has occured when the render was in the backgroun
|
|
18
|
+
var distortedDuration = document.visibilityState !== 'visible';
|
|
19
|
+
|
|
20
|
+
function handleVisibilityChange() {
|
|
21
|
+
if (document.visibilityState !== 'visible') {
|
|
22
|
+
distortedDuration = true;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
document.addEventListener('visibilitychange', handleVisibilityChange);
|
|
27
|
+
return {
|
|
28
|
+
distortedDuration: distortedDuration,
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Cleans up the document visibility event listener
|
|
32
|
+
*/
|
|
33
|
+
cleanup: function cleanup() {
|
|
34
|
+
document.removeEventListener('visibilitychange', handleVisibilityChange);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
2
38
|
/**
|
|
3
39
|
* Measures time it takes to render a frame including -> style, paint, layout and composition.
|
|
4
40
|
*
|
|
@@ -37,29 +73,12 @@ onMeasureComplete) {
|
|
|
37
73
|
var startMark = "[START]: ".concat(measureName);
|
|
38
74
|
var endMark = "[END]: ".concat(measureName);
|
|
39
75
|
var startTime = performance.now();
|
|
40
|
-
performance.mark(startMark);
|
|
41
|
-
|
|
42
|
-
//
|
|
43
|
-
// For the purposes of using performance measurement -- this behaviour means the events
|
|
44
|
-
// which have been fired in the background are not useful -- and lead to other events
|
|
45
|
-
// being hard to draw conclusions from.
|
|
46
|
-
//
|
|
47
|
-
// To mitigate this -- we detect this state -- and fire a seperate callback when the
|
|
48
|
-
// measurement has occured when the render was in the backgroun
|
|
49
|
-
|
|
50
|
-
var distortedDuration = document.visibilityState !== 'visible';
|
|
51
|
-
|
|
52
|
-
function handleVisibilityChange() {
|
|
53
|
-
if (document.visibilityState !== 'visible') {
|
|
54
|
-
distortedDuration = true;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
document.addEventListener('visibilitychange', handleVisibilityChange);
|
|
76
|
+
performance.mark(startMark);
|
|
77
|
+
var distortedDurationMonitor = getDistortedDurationMonitor();
|
|
59
78
|
requestAnimationFrame(function () {
|
|
60
79
|
requestAnimationFrame(function () {
|
|
61
80
|
performance.mark(endMark);
|
|
62
|
-
|
|
81
|
+
distortedDurationMonitor.cleanup();
|
|
63
82
|
var duration = performance.now() - startTime;
|
|
64
83
|
|
|
65
84
|
try {
|
|
@@ -70,20 +89,20 @@ onMeasureComplete) {
|
|
|
70
89
|
onMeasureComplete({
|
|
71
90
|
duration: duration,
|
|
72
91
|
startTime: startTime,
|
|
73
|
-
distortedDuration: distortedDuration
|
|
92
|
+
distortedDuration: distortedDurationMonitor.distortedDuration
|
|
74
93
|
});
|
|
75
94
|
} else {
|
|
76
95
|
onMeasureComplete({
|
|
77
96
|
duration: entry.duration,
|
|
78
97
|
startTime: entry.startTime,
|
|
79
|
-
distortedDuration: distortedDuration
|
|
98
|
+
distortedDuration: distortedDurationMonitor.distortedDuration
|
|
80
99
|
});
|
|
81
100
|
}
|
|
82
101
|
} catch (e) {
|
|
83
102
|
onMeasureComplete({
|
|
84
103
|
duration: duration,
|
|
85
104
|
startTime: startTime,
|
|
86
|
-
distortedDuration: distortedDuration
|
|
105
|
+
distortedDuration: distortedDurationMonitor.distortedDuration
|
|
87
106
|
});
|
|
88
107
|
}
|
|
89
108
|
|
package/dist/esm/version.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, BROWSER_FREEZE_INTERACTION_TYPE, CONTENT_COMPONENT, DELETE_DIRECTION, EVENT_TYPE, FLOATING_CONTROLS_TITLE, FULL_WIDTH_MODE, GAP_CURSOR_POSITION, INDENT_DIRECTION, INDENT_TYPE, INPUT_METHOD, LAYOUT_TYPE, LINK_REPRESENTATION, LINK_RESOURCE, LINK_STATUS, LIST_TEXT_SCENARIOS, MODE, PLATFORMS, PUNC, PasteContents, PasteSources, PasteTypes, RESOLVE_METHOD, SELECTION_TYPE, SELECTION_POSITION, SMART_LINK_TYPE, SYMBOL, SmartLinkNodeContexts, TABLE_ACTION, TABLE_BREAKOUT, TARGET_SELECTION_SOURCE, TOOLBAR_ACTION_SUBJECT_ID, TRIGGER_METHOD, USER_CONTEXT, } from './types';
|
|
2
|
-
export type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadCallback, AnalyticsEventPayloadWithChannel, AnnotationAEP, AnnotationAEPAttributes, AnnotationActionType, AnnotationDraftAEPAttributes, AnnotationResolvedAEPAttributes, CaptionTrackAction, ColorPickerAEP, CommonListAnalyticsAttributes, CreateLinkInlineDialogActionType, CreateLinkInlineDialogEventPayload, DismissedCreateLinkInlineDialogAEP, DispatchAnalyticsEvent, EditLinkToolbarAEP, EnteredTextLinkSearchInputAEP, ErrorEventAttributes, ErrorEventPayload, ExperimentalEventPayload, ExtensionEventPayload, ExtensionType, FeatureExposureAEP, FormatEventPayload, GeneralEventPayload, HighlightedSearchResultsAEP, InputMethodInsertLink, InputMethodInsertMedia, InsertEventPayload, InsertSmartLinkAEP, ListEventPayload, MediaAltTextActionType, MediaEventPayload, MediaLinkAEP, NodeCount, NodeEventPayload, PASTE_ACTION_SUBJECT_ID, PasteContent, PasteEventPayload, PasteSource, PasteType, PluginMethodReport, PluginPerformanceReportData, PluginsReport, QuickSearchPerfAEP, RecentActivitiesPerfAEP, SelectAllAEP, SelectCellAEP, SelectNodeAEP, SelectRangeAEP, SelectedSearchResultsAEP, SelectionEventPayload, SelectionJson, ShownPostQuerySearchResultsAEP, ShownPreQuerySearchResultsAEP, SimplifiedNode, SmartLinkNodeContext, SubstituteEventPayload, TableEventPayload, TextColorSelectedAEP, TextColorSelectedAttr, TextColorShowPaletteToggleAEP, TextColorShowPaletteToggleAttr, ToolbarEventPayload, TransactionEventPayload, TypeAheadPayload, UfoSessionCompletePayloadAEP, UnlinkToolbarAEP, ViewedCreateLinkInlineDialogAEP, FireAnalyticsCallback, } from './types';
|
|
2
|
+
export type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadCallback, AnalyticsEventPayloadWithChannel, AnnotationAEP, AnnotationAEPAttributes, AnnotationActionType, AnnotationDraftAEPAttributes, AnnotationResolvedAEPAttributes, CaptionTrackAction, ColorPickerAEP, CommonListAnalyticsAttributes, CreateLinkInlineDialogActionType, CreateLinkInlineDialogEventPayload, DismissedCreateLinkInlineDialogAEP, DispatchAnalyticsEvent, EditLinkToolbarAEP, EnteredTextLinkSearchInputAEP, ErrorEventAttributes, ErrorEventPayload, ExperimentalEventPayload, ExtensionEventPayload, ExtensionType, FeatureExposureAEP, FormatEventPayload, GeneralEventPayload, HighlightedSearchResultsAEP, InputMethodInsertLink, InputMethodInsertMedia, InsertEventPayload, InsertSmartLinkAEP, ListEventPayload, MediaAltTextActionType, MediaEventPayload, MediaLinkAEP, NodeCount, NodeEventPayload, PASTE_ACTION_SUBJECT_ID, PasteContent, PasteEventPayload, PasteSource, PasteType, PluginMethodReport, PluginPerformanceReportData, PluginsReport, QuickSearchPerfAEP, RecentActivitiesPerfAEP, SelectAllAEP, SelectCellAEP, SelectNodeAEP, SelectRangeAEP, SelectedSearchResultsAEP, SelectionEventPayload, SelectionJson, ShownPostQuerySearchResultsAEP, ShownPreQuerySearchResultsAEP, SimplifiedNode, SmartLinkNodeContext, SubstituteEventPayload, TableEventPayload, TextColorSelectedAEP, TextColorSelectedAttr, TextColorShowPaletteToggleAEP, TextColorShowPaletteToggleAttr, ToolbarEventPayload, TransactionEventPayload, TypeAheadPayload, UfoSessionCompletePayloadAEP, UnlinkToolbarAEP, ViewedCreateLinkInlineDialogAEP, FireAnalyticsCallback, InitialiseFragmentMarksAEP, ConnectedNodesAEP, DisconnectedSourceAEP, DisconnectedTargetAEP, GotConnectionsAEP, UpdatedFragmentMarkNameAEP, UpdatedSourceAEP, UpdatedTargetAEP, } from './types';
|
|
3
3
|
export type { EditorAnalyticsAPI } from './api';
|
|
@@ -19,6 +19,8 @@ export declare enum ACTION {
|
|
|
19
19
|
CLICKED = "clicked",
|
|
20
20
|
CLOSED = "closed",
|
|
21
21
|
COMMITTED = "committed",
|
|
22
|
+
/** used in @atlassian/editor-referentiality */
|
|
23
|
+
CONNECTED_NODES = "connectedNodes",
|
|
22
24
|
CONVERTED = "converted",
|
|
23
25
|
COPIED = "copied",
|
|
24
26
|
CUT = "cut",
|
|
@@ -26,6 +28,10 @@ export declare enum ACTION {
|
|
|
26
28
|
DECREMENTED = "decremented",
|
|
27
29
|
DELETED = "deleted",
|
|
28
30
|
DISCARDED_INVALID_STEPS_FROM_TRANSACTION = "discardedInvalidStepsFromTransaction",
|
|
31
|
+
/** used in @atlassian/editor-referentiality */
|
|
32
|
+
DISCONNECTED_SOURCE = "disconnectedSource",
|
|
33
|
+
/** used in @atlassian/editor-referentiality */
|
|
34
|
+
DISCONNECTED_TARGET = "disconnectedTarget",
|
|
29
35
|
DISMISSED = "dismissed",
|
|
30
36
|
DISPATCHED_INVALID_TRANSACTION = "dispatchedInvalidTransaction",
|
|
31
37
|
DISPATCHED_VALID_TRANSACTION = "dispatchedValidTransaction",
|
|
@@ -49,11 +55,15 @@ export declare enum ACTION {
|
|
|
49
55
|
INCREMENTED = "incremented",
|
|
50
56
|
INDENTED = "indented",
|
|
51
57
|
INITIALISED = "initialised",
|
|
58
|
+
/** used in @atlassian/editor-referentiality */
|
|
59
|
+
INITIALISED_FRAGMENT_MARK = "initialisedFragmentMark",
|
|
52
60
|
INPUT_PERF_SAMPLING = "inputPerfSampling",
|
|
53
61
|
INPUT_PERF_SAMPLING_AVG = "inputPerfSamplingAvg",
|
|
54
62
|
INSERTED = "inserted",
|
|
55
63
|
INVALID_DOCUMENT_ENCOUNTERED = "invalidDocumentEncountered",
|
|
56
64
|
INVOKED = "invoked",
|
|
65
|
+
/** used in @atlassian/editor-referentiality */
|
|
66
|
+
GOT_CONNECTIONS = "gotConnections",
|
|
57
67
|
LANGUAGE_SELECTED = "languageSelected",
|
|
58
68
|
LIST_ITEM_JOINED = "listItemJoined",
|
|
59
69
|
MATCHED = "matched",
|
|
@@ -82,6 +92,7 @@ export declare enum ACTION {
|
|
|
82
92
|
DEDUPE_MARKS_TRANSFORMED = "dedupeMarksTransformed",
|
|
83
93
|
NODES_MISSING_CONTENT_TRANSFORMED = "nodesMissingContentTransformed",
|
|
84
94
|
INDENTATION_MARKS_TRANSFORMED = "indentationMarksTransformed",
|
|
95
|
+
INVALID_MEDIA_CONTENT_TRANSFORMED = "invalidMediaContentTransformed",
|
|
85
96
|
TOGGLE_EXPAND = "toggleExpand",
|
|
86
97
|
TRANSACTION_DISPATCHED = "transactionDispatched",
|
|
87
98
|
TRANSACTION_MUTATED_AFTER_DISPATCH = "transactionMutatedAfterDispatched",
|
|
@@ -90,6 +101,12 @@ export declare enum ACTION {
|
|
|
90
101
|
UNLINK = "unlinked",
|
|
91
102
|
UNSUPPORTED_CONTENT_ENCOUNTERED = "unsupportedContentEncountered",
|
|
92
103
|
UPDATED = "updated",
|
|
104
|
+
/** used in @atlassian/editor-referentiality */
|
|
105
|
+
UPDATED_FRAGMENT_MARK_NAME = "updatedFragmentMarkName",
|
|
106
|
+
/** used in @atlassian/editor-referentiality */
|
|
107
|
+
UPDATED_SOURCE = "updatedSource",
|
|
108
|
+
/** used in @atlassian/editor-referentiality */
|
|
109
|
+
UPDATED_TARGET = "updatedTarget",
|
|
93
110
|
UPLOAD_EXTERNAL_FAIL = "uploadExternalFailed",
|
|
94
111
|
VIEWED = "viewed",
|
|
95
112
|
VISITED = "visited",
|
|
@@ -225,7 +242,7 @@ export declare enum ACTION_SUBJECT_ID {
|
|
|
225
242
|
FORMAT_SUB = "subscript",
|
|
226
243
|
FORMAT_SUPER = "superscript",
|
|
227
244
|
FORMAT_UNDERLINE = "underline",
|
|
228
|
-
|
|
245
|
+
FRAGMENT_MARK = "fragmentMark",
|
|
229
246
|
GOTO_SMART_LINK_SETTINGS = "goToSmartLinkSettings",
|
|
230
247
|
HELP_QUICK_INSERT = "helpQuickInsert",
|
|
231
248
|
HYPERLINK = "hyperlink",
|
|
@@ -175,5 +175,6 @@ declare type DedupeMarksTransformedAEP = OperationalAEP<ACTION.DEDUPE_MARKS_TRAN
|
|
|
175
175
|
}, undefined>;
|
|
176
176
|
declare type IndentationMarksTransformedAEP = OperationalAEP<ACTION.INDENTATION_MARKS_TRANSFORMED, ACTION_SUBJECT.EDITOR, undefined, undefined, undefined>;
|
|
177
177
|
declare type NodesMissingContentTransformedAEP = OperationalAEP<ACTION.NODES_MISSING_CONTENT_TRANSFORMED, ACTION_SUBJECT.EDITOR, undefined, undefined, undefined>;
|
|
178
|
-
|
|
178
|
+
declare type InvalidMediaContentTransformedAEP = OperationalAEP<ACTION.INVALID_MEDIA_CONTENT_TRANSFORMED, ACTION_SUBJECT.EDITOR, undefined, undefined, undefined>;
|
|
179
|
+
export declare type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ColorPickerAEP | DispatchedTransactionAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | EditorTTIAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamlingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | UfoSessionCompletePayloadAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP | InvalidMediaContentTransformedAEP;
|
|
179
180
|
export {};
|
|
@@ -32,3 +32,4 @@ export type { ToolbarEventPayload } from './toolbar-button';
|
|
|
32
32
|
export type { TypeAheadPayload } from './type-ahead';
|
|
33
33
|
export { SELECTION_POSITION, SELECTION_TYPE } from './utils';
|
|
34
34
|
export type { PluginMethodReport, PluginsReport, NodeCount, PluginPerformanceReportData, } from './performance-report';
|
|
35
|
+
export type { InitialiseFragmentMarksAEP, ConnectedNodesAEP, DisconnectedSourceAEP, DisconnectedTargetAEP, GotConnectionsAEP, UpdatedFragmentMarkNameAEP, UpdatedSourceAEP, UpdatedTargetAEP, } from './referentiality-events';
|
|
@@ -1,9 +1,52 @@
|
|
|
1
|
-
import { ACTION, ACTION_SUBJECT,
|
|
1
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from './enums';
|
|
2
2
|
import { OperationalAEP } from './utils';
|
|
3
|
-
declare type
|
|
3
|
+
export declare type InitialiseFragmentMarksAEP = OperationalAEP<ACTION.INITIALISED_FRAGMENT_MARK, ACTION_SUBJECT.DOCUMENT, undefined, {
|
|
4
4
|
duration: number;
|
|
5
5
|
docSize: number;
|
|
6
6
|
count: number;
|
|
7
7
|
}, EVENT_TYPE.OPERATIONAL>;
|
|
8
|
-
export declare type
|
|
9
|
-
|
|
8
|
+
export declare type ConnectedNodesAEP = OperationalAEP<ACTION.CONNECTED_NODES, ACTION_SUBJECT.DOCUMENT, undefined, {
|
|
9
|
+
actionType: string;
|
|
10
|
+
docSize: number;
|
|
11
|
+
duration: number;
|
|
12
|
+
sourceNodeType: string;
|
|
13
|
+
targetNodeType: string;
|
|
14
|
+
type: string;
|
|
15
|
+
}, EVENT_TYPE.OPERATIONAL>;
|
|
16
|
+
export declare type DisconnectedSourceAEP = OperationalAEP<ACTION.DISCONNECTED_SOURCE, ACTION_SUBJECT.DOCUMENT, undefined, {
|
|
17
|
+
docSize: number;
|
|
18
|
+
duration: number;
|
|
19
|
+
targetNodeType: string;
|
|
20
|
+
}, EVENT_TYPE.OPERATIONAL>;
|
|
21
|
+
export declare type DisconnectedTargetAEP = OperationalAEP<ACTION.DISCONNECTED_TARGET, ACTION_SUBJECT.DOCUMENT, undefined, {
|
|
22
|
+
docSize: number;
|
|
23
|
+
duration: number;
|
|
24
|
+
sourceNodeType: string;
|
|
25
|
+
targetNodeType: string;
|
|
26
|
+
}, EVENT_TYPE.OPERATIONAL>;
|
|
27
|
+
export declare type GotConnectionsAEP = OperationalAEP<ACTION.GOT_CONNECTIONS, ACTION_SUBJECT.DOCUMENT, undefined, {
|
|
28
|
+
count: number;
|
|
29
|
+
docSize: number;
|
|
30
|
+
duration: number;
|
|
31
|
+
}, EVENT_TYPE.OPERATIONAL>;
|
|
32
|
+
export declare type UpdatedFragmentMarkNameAEP = OperationalAEP<ACTION.UPDATED_FRAGMENT_MARK_NAME, ACTION_SUBJECT.DOCUMENT, undefined, {
|
|
33
|
+
duration: number;
|
|
34
|
+
nodeType: string;
|
|
35
|
+
}, EVENT_TYPE.OPERATIONAL>;
|
|
36
|
+
export declare type UpdatedSourceAEP = OperationalAEP<ACTION.UPDATED_SOURCE, ACTION_SUBJECT.DOCUMENT, undefined, {
|
|
37
|
+
docSize: number;
|
|
38
|
+
duration: number;
|
|
39
|
+
newSourceNodeType: string;
|
|
40
|
+
oldSourceNodeType: string;
|
|
41
|
+
type: UPDATED_TYPE;
|
|
42
|
+
}, EVENT_TYPE.OPERATIONAL>;
|
|
43
|
+
export declare type UPDATED_TYPE = 'update' | 'replaceAndUpdate';
|
|
44
|
+
export declare type UpdatedTargetAEP = OperationalAEP<ACTION.UPDATED_TARGET, ACTION_SUBJECT.DOCUMENT, undefined, {
|
|
45
|
+
docSize: number;
|
|
46
|
+
duration: number;
|
|
47
|
+
newTargetNodeType: string;
|
|
48
|
+
oldTargetNodeType: string;
|
|
49
|
+
sourceNodeType: string;
|
|
50
|
+
type: UPDATED_TYPE;
|
|
51
|
+
}, EVENT_TYPE.OPERATIONAL>;
|
|
52
|
+
export declare type ReferentialityEventPayload = InitialiseFragmentMarksAEP | ConnectedNodesAEP | DisconnectedSourceAEP | DisconnectedTargetAEP | GotConnectionsAEP | UpdatedFragmentMarkNameAEP | UpdatedSourceAEP | UpdatedTargetAEP;
|
|
@@ -64,7 +64,6 @@ export declare const paste: Keymap;
|
|
|
64
64
|
export declare const altPaste: Keymap;
|
|
65
65
|
export declare const find: Keymap;
|
|
66
66
|
export declare const alignLeft: Keymap;
|
|
67
|
-
export declare const alignRight: Keymap;
|
|
68
67
|
export declare function tooltip(keymap?: Keymap, description?: string): string | undefined;
|
|
69
68
|
export declare const ToolTipContent: React.MemoExoticComponent<({ description, shortcutOverride, keymap, }: {
|
|
70
69
|
description?: string | React.ReactNode;
|
|
@@ -19,12 +19,17 @@ export declare const toolbarInsertBlockMessages: {
|
|
|
19
19
|
defaultMessage: string;
|
|
20
20
|
description: string;
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
mediaFiles: {
|
|
23
23
|
id: string;
|
|
24
24
|
defaultMessage: string;
|
|
25
25
|
description: string;
|
|
26
26
|
};
|
|
27
|
-
|
|
27
|
+
addMediaFiles: {
|
|
28
|
+
id: string;
|
|
29
|
+
defaultMessage: string;
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
mediaFilesDescription: {
|
|
28
33
|
id: string;
|
|
29
34
|
defaultMessage: string;
|
|
30
35
|
description: string;
|
package/dist/types/panel.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { getPanelTypeBackground, darkPanelColors, getPanelDarkColor, panelSharedStyles, panelSharedStylesWithoutPrefix, PanelSharedCssClassName, PanelSharedSelectors, getPanelBackgroundDarkModeColors, } from './styles/shared/panel';
|
|
1
|
+
export { getPanelTypeBackground, getPanelTypeBackgroundNoTokens, darkPanelColors, getPanelDarkColor, panelSharedStyles, panelSharedStylesWithoutPrefix, PanelSharedCssClassName, PanelSharedSelectors, getPanelBackgroundDarkModeColors, } from './styles/shared/panel';
|
|
@@ -79,6 +79,7 @@ export declare const PanelSharedSelectors: {
|
|
|
79
79
|
yellowWarningIcon: string;
|
|
80
80
|
copyButton: string;
|
|
81
81
|
};
|
|
82
|
+
export declare const getPanelTypeBackgroundNoTokens: (panelType: Exclude<PanelType, PanelType.CUSTOM>, props?: ThemeProps) => string;
|
|
82
83
|
export declare const getPanelTypeBackground: (panelType: Exclude<PanelType, PanelType.CUSTOM>, props?: ThemeProps) => string;
|
|
83
84
|
export declare const panelSharedStylesWithoutPrefix: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
84
85
|
export declare const panelSharedStyles: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
@@ -244,12 +244,6 @@ export declare type FeatureFlags = {
|
|
|
244
244
|
* @default false
|
|
245
245
|
*/
|
|
246
246
|
saferDispatchedTransactions?: boolean;
|
|
247
|
-
/**
|
|
248
|
-
* Create non-smart hyperlinks on plain text paste (Cmd/Ctrl+Shift+v)
|
|
249
|
-
* @see https://product-fabric.atlassian.net/browse/EDM-2492
|
|
250
|
-
* @default false
|
|
251
|
-
*/
|
|
252
|
-
plainTextPasteLinkification?: boolean;
|
|
253
247
|
/**
|
|
254
248
|
* @description
|
|
255
249
|
* Enable new collab service
|
|
@@ -339,6 +333,33 @@ export declare type FeatureFlags = {
|
|
|
339
333
|
* @default null
|
|
340
334
|
*/
|
|
341
335
|
floatingToolbarLinkSettingsButton?: string;
|
|
336
|
+
/**
|
|
337
|
+
* @description
|
|
338
|
+
* Allow numbered lists to start from any number greater than 0, not just 1
|
|
339
|
+
*
|
|
340
|
+
* @see https://product-fabric.atlassian.net/wiki/spaces/EUXQ/pages/3257270398/MAKE+PP+Restart+Numbered+Lists
|
|
341
|
+
* @see https://product-fabric.atlassian.net/browse/ED-15210
|
|
342
|
+
* @default false
|
|
343
|
+
*/
|
|
344
|
+
restartNumberedLists?: boolean;
|
|
345
|
+
/**
|
|
346
|
+
* @description
|
|
347
|
+
* Allow lists to continue their numbering when split by other nodes
|
|
348
|
+
*
|
|
349
|
+
* @see https://product-fabric.atlassian.net/wiki/spaces/EUXQ/pages/3257270398/MAKE+PP+Restart+Numbered+Lists
|
|
350
|
+
* @see https://product-fabric.atlassian.net/browse/ED-15210
|
|
351
|
+
* @default false
|
|
352
|
+
*/
|
|
353
|
+
listNumberContinuity?: boolean;
|
|
354
|
+
/**
|
|
355
|
+
* @description
|
|
356
|
+
* Show a toolbar for users to restart the numbering of a list
|
|
357
|
+
*
|
|
358
|
+
* @see https://product-fabric.atlassian.net/wiki/spaces/EUXQ/pages/3257270398/MAKE+PP+Restart+Numbered+Lists
|
|
359
|
+
* @see https://product-fabric.atlassian.net/browse/ED-15210
|
|
360
|
+
* @default false
|
|
361
|
+
*/
|
|
362
|
+
restartNumberedListsToolbar?: boolean;
|
|
342
363
|
};
|
|
343
364
|
export declare type FeatureFlagKey = keyof FeatureFlags;
|
|
344
365
|
export declare type GetEditorFeatureFlags = () => FeatureFlags;
|
|
@@ -17,6 +17,9 @@ export interface DropdownOptionT<T> {
|
|
|
17
17
|
id?: string;
|
|
18
18
|
title: string;
|
|
19
19
|
onClick: T;
|
|
20
|
+
onMouseOver?: T;
|
|
21
|
+
onMouseEnter?: T;
|
|
22
|
+
onMouseLeave?: T;
|
|
20
23
|
selected?: boolean;
|
|
21
24
|
disabled?: boolean;
|
|
22
25
|
hidden?: boolean;
|
|
@@ -198,6 +201,7 @@ export interface FloatingToolbarConfig {
|
|
|
198
201
|
className?: string;
|
|
199
202
|
height?: number;
|
|
200
203
|
width?: number;
|
|
204
|
+
zIndex?: number;
|
|
201
205
|
offset?: [number, number];
|
|
202
206
|
forcePlacement?: boolean;
|
|
203
207
|
onPositionCalculated?: (editorView: EditorView, nextPos: Position) => Position;
|
|
@@ -10,6 +10,11 @@ export interface Props {
|
|
|
10
10
|
borderColor: string;
|
|
11
11
|
checkMarkColor?: string;
|
|
12
12
|
autoFocus?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* When set to true -- the presentation of colors in the
|
|
15
|
+
* palette will use design tokens when available.
|
|
16
|
+
*/
|
|
17
|
+
useDesignTokens: boolean;
|
|
13
18
|
}
|
|
14
19
|
declare class Color extends PureComponent<Props> {
|
|
15
20
|
render(): jsx.JSX.Element;
|
|
@@ -8,6 +8,14 @@ interface Props {
|
|
|
8
8
|
onClick: (value: string, label: string) => void;
|
|
9
9
|
cols?: number;
|
|
10
10
|
className?: string;
|
|
11
|
+
/**
|
|
12
|
+
* When the color picker is used to present text colors we
|
|
13
|
+
* make a number of changes to how it works
|
|
14
|
+
* - the check mark color uses design tokens when available
|
|
15
|
+
* - the colors use design tokens when available
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
textPalette?: boolean;
|
|
11
19
|
}
|
|
12
20
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
|
|
13
21
|
WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { PureComponent } from 'react';
|
|
2
2
|
import { OpenChangedEvent } from '../../ui/DropList';
|
|
3
|
+
import { KeyDownHandlerContext } from '../DropdownMenu/types';
|
|
3
4
|
export interface Props {
|
|
4
5
|
mountTo?: HTMLElement;
|
|
5
6
|
boundariesElement?: HTMLElement;
|
|
@@ -10,6 +11,8 @@ export interface Props {
|
|
|
10
11
|
fitWidth?: number;
|
|
11
12
|
fitHeight?: number;
|
|
12
13
|
zIndex?: number;
|
|
14
|
+
disableArrowKeyNavigation?: boolean;
|
|
15
|
+
keyDownHandlerContext?: KeyDownHandlerContext;
|
|
13
16
|
}
|
|
14
17
|
export interface State {
|
|
15
18
|
target?: HTMLElement;
|
|
@@ -13,6 +13,7 @@ export default class DropdownMenuWrapper extends PureComponent<Props, State> {
|
|
|
13
13
|
state: State;
|
|
14
14
|
private handleRef;
|
|
15
15
|
private updatePopupPlacement;
|
|
16
|
+
private handleCloseandFocus;
|
|
16
17
|
private handleClose;
|
|
17
18
|
private renderDropdownMenu;
|
|
18
19
|
render(): jsx.JSX.Element;
|
|
@@ -9,6 +9,7 @@ export interface Props {
|
|
|
9
9
|
onItemActivated?: (attrs: any) => void;
|
|
10
10
|
onMouseEnter?: (attrs: any) => void;
|
|
11
11
|
onMouseLeave?: (attrs: any) => void;
|
|
12
|
+
keyDownHandlerContext?: KeyDownHandlerContext;
|
|
12
13
|
fitWidth?: number;
|
|
13
14
|
fitHeight?: number;
|
|
14
15
|
offset?: Array<number>;
|
|
@@ -17,6 +18,12 @@ export interface Props {
|
|
|
17
18
|
items: MenuItem[];
|
|
18
19
|
}>;
|
|
19
20
|
shouldUseDefaultRole?: boolean;
|
|
21
|
+
disableArrowKeyNavigation?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface KeyDownHandlerContext {
|
|
24
|
+
handleArrowRight: () => void;
|
|
25
|
+
handleArrowLeft: () => void;
|
|
26
|
+
handleTab: () => void;
|
|
20
27
|
}
|
|
21
28
|
export interface MenuItem {
|
|
22
29
|
key?: string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { KeyDownHandlerContext } from '../DropdownMenu/types';
|
|
3
|
+
declare type SimpleEventHandler<T> = (event: T) => void;
|
|
4
|
+
/**
|
|
5
|
+
* This component is a wrapper of vertical menus which listens to keydown events of children
|
|
6
|
+
* and handles up/down arrow key navigation
|
|
7
|
+
*/
|
|
8
|
+
export declare const MenuArrowKeyNavigationProvider: ({ children, handleClose, disableArrowKeyNavigation, keyDownHandlerContext, closeonTab, }: {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
handleClose?: SimpleEventHandler<KeyboardEvent> | undefined;
|
|
11
|
+
disableArrowKeyNavigation?: boolean | undefined;
|
|
12
|
+
keyDownHandlerContext?: KeyDownHandlerContext | undefined;
|
|
13
|
+
closeonTab?: boolean | undefined;
|
|
14
|
+
}) => JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -4,6 +4,8 @@ export interface WithOutsideClickProps {
|
|
|
4
4
|
handleClickOutside?: SimpleEventHandler<MouseEvent>;
|
|
5
5
|
handleEscapeKeydown?: SimpleEventHandler<KeyboardEvent>;
|
|
6
6
|
handleEnterKeydown?: SimpleEventHandler<KeyboardEvent>;
|
|
7
|
+
targetRef?: any;
|
|
8
|
+
closeonTab?: boolean;
|
|
7
9
|
}
|
|
8
10
|
export default function withReactEditorViewOuterListeners<P>(Component: ComponentClass<P> | StatelessComponent<P>): React.FC<P & WithOutsideClickProps>;
|
|
9
11
|
export {};
|
|
@@ -21,7 +21,7 @@ export { default as ADFTraversor } from './traversor';
|
|
|
21
21
|
export { analyticsEventKey, getAnalyticsAppearance, getAnalyticsEventSeverity, SEVERITY, getUnsupportedContentLevelData, UNSUPPORTED_CONTENT_LEVEL_SEVERITY, UNSUPPORTED_CONTENT_LEVEL_SEVERITY_THRESHOLD_DEFAULTS, } from './analytics';
|
|
22
22
|
export type { UnsupportedContentTooltipPayload, UnsupportedContentPayload, UnsupportedContentLevelsTracking, } from './analytics';
|
|
23
23
|
export { findAndTrackUnsupportedContentNodes } from './track-unsupported-content';
|
|
24
|
-
export { measureRender } from './performance/measure-render';
|
|
24
|
+
export { getDistortedDurationMonitor, measureRender, } from './performance/measure-render';
|
|
25
25
|
export { startMeasure, stopMeasure, clearMeasure } from './performance/measure';
|
|
26
26
|
export { measureTTI, getTTISeverity, TTI_SEVERITY_THRESHOLD_DEFAULTS, TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS, } from './performance/measure-tti';
|
|
27
27
|
export { isPerformanceAPIAvailable, isPerformanceObserverAvailable, } from './performance/is-performance-api-available';
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Monitors if a pages enters a visibility state which will lead to
|
|
3
|
+
* distorted duration measurements (where the measurement uses the
|
|
4
|
+
* requestAnimationFrame api).
|
|
5
|
+
*/
|
|
6
|
+
export declare function getDistortedDurationMonitor(): {
|
|
7
|
+
distortedDuration: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Cleans up the document visibility event listener
|
|
10
|
+
*/
|
|
11
|
+
cleanup(): void;
|
|
12
|
+
};
|
|
1
13
|
/**
|
|
2
14
|
* Measures time it takes to render a frame including -> style, paint, layout and composition.
|
|
3
15
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "71.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/"
|
|
@@ -63,21 +63,22 @@
|
|
|
63
63
|
"@atlaskit/analytics-namespaced-context": "^6.5.0",
|
|
64
64
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
65
65
|
"@atlaskit/analytics-next-stable-react-context": "1.0.1",
|
|
66
|
-
"@atlaskit/button": "^16.
|
|
66
|
+
"@atlaskit/button": "^16.5.0",
|
|
67
67
|
"@atlaskit/code": "^14.4.0",
|
|
68
68
|
"@atlaskit/codemod-utils": "^4.1.0",
|
|
69
69
|
"@atlaskit/editor-json-transformer": "^8.8.0",
|
|
70
|
+
"@atlaskit/editor-palette": "0.1.0",
|
|
70
71
|
"@atlaskit/editor-shared-styles": "^2.2.0",
|
|
71
|
-
"@atlaskit/emoji": "^66.
|
|
72
|
+
"@atlaskit/emoji": "^66.1.0",
|
|
72
73
|
"@atlaskit/icon": "^21.11.0",
|
|
73
74
|
"@atlaskit/in-product-testing": "^0.1.0",
|
|
74
|
-
"@atlaskit/media-card": "^74.
|
|
75
|
-
"@atlaskit/media-client": "^
|
|
75
|
+
"@atlaskit/media-card": "^74.3.0",
|
|
76
|
+
"@atlaskit/media-client": "^19.0.0",
|
|
76
77
|
"@atlaskit/media-picker": "^64.0.0",
|
|
77
78
|
"@atlaskit/mention": "^21.0.0",
|
|
78
79
|
"@atlaskit/menu": "^1.4.0",
|
|
79
|
-
"@atlaskit/profilecard": "^17.
|
|
80
|
-
"@atlaskit/smart-card": "^23.
|
|
80
|
+
"@atlaskit/profilecard": "^17.3.0",
|
|
81
|
+
"@atlaskit/smart-card": "^23.7.0",
|
|
81
82
|
"@atlaskit/smart-user-picker": "^6.0.0",
|
|
82
83
|
"@atlaskit/task-decision": "^17.5.0",
|
|
83
84
|
"@atlaskit/theme": "^12.2.0",
|
package/report.api.md
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
|
+
<!-- API Report Version: 2.2 -->
|
|
2
|
+
|
|
1
3
|
## API Report File for "@atlaskit/editor-common"
|
|
2
4
|
|
|
3
|
-
> Do not edit this file.
|
|
5
|
+
> Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
|
|
6
|
+
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
7
|
+
|
|
8
|
+
### Table of contents
|
|
4
9
|
|
|
5
|
-
|
|
6
|
-
Generated API Report version: 2.0
|
|
7
|
-
-->
|
|
10
|
+
- [Main Entry Types](#main-entry-types)
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
### Main Entry Types
|
|
13
|
+
|
|
14
|
+
<!--SECTION START: Main Entry Types-->
|
|
10
15
|
|
|
11
16
|
```ts
|
|
12
17
|
// (No @packageDocumentation comment for this package)
|
|
13
18
|
```
|
|
19
|
+
|
|
20
|
+
<!--SECTION END: Main Entry Types-->
|