@atlaskit/editor-common 93.4.1 → 93.4.3
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 +30 -0
- package/dist/cjs/analytics/types/enums.js +4 -0
- package/dist/cjs/analytics/types/mention-events.js +5 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/styles/shared/headings.js +97 -73
- package/dist/cjs/styles/shared/paragraph.js +28 -14
- package/dist/cjs/ugc-tokens/editor-ugc-token-names.js +33 -0
- package/dist/cjs/ugc-tokens/get-editor-ugc-token.js +23 -0
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/Layer/index.js +7 -1
- package/dist/es2019/analytics/types/enums.js +4 -0
- package/dist/es2019/analytics/types/mention-events.js +1 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/styles/shared/headings.js +102 -73
- package/dist/es2019/styles/shared/paragraph.js +27 -14
- package/dist/es2019/ugc-tokens/editor-ugc-token-names.js +27 -0
- package/dist/es2019/ugc-tokens/get-editor-ugc-token.js +17 -0
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/Layer/index.js +7 -1
- package/dist/esm/analytics/types/enums.js +4 -0
- package/dist/esm/analytics/types/mention-events.js +1 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/styles/shared/headings.js +99 -72
- package/dist/esm/styles/shared/paragraph.js +27 -14
- package/dist/esm/ugc-tokens/editor-ugc-token-names.js +27 -0
- package/dist/esm/ugc-tokens/get-editor-ugc-token.js +17 -0
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/Layer/index.js +7 -1
- package/dist/types/analytics/api.d.ts +2 -1
- package/dist/types/analytics/types/enums.d.ts +4 -0
- package/dist/types/analytics/types/events.d.ts +2 -1
- package/dist/types/analytics/types/mention-events.d.ts +80 -0
- package/dist/types/styles/shared/headings.d.ts +1 -1
- package/dist/types/styles/shared/paragraph.d.ts +1 -1
- package/dist/types/ugc-tokens/editor-ugc-token-names.d.ts +12 -0
- package/dist/types/ugc-tokens/get-editor-ugc-token.d.ts +3 -0
- package/dist/types-ts4.5/analytics/api.d.ts +2 -1
- package/dist/types-ts4.5/analytics/types/enums.d.ts +4 -0
- package/dist/types-ts4.5/analytics/types/events.d.ts +2 -1
- package/dist/types-ts4.5/analytics/types/mention-events.d.ts +80 -0
- package/dist/types-ts4.5/styles/shared/headings.d.ts +1 -1
- package/dist/types-ts4.5/styles/shared/paragraph.d.ts +1 -1
- package/dist/types-ts4.5/ugc-tokens/editor-ugc-token-names.d.ts +12 -0
- package/dist/types-ts4.5/ugc-tokens/get-editor-ugc-token.d.ts +3 -0
- package/package.json +3 -3
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export var editorUGCTokens = {
|
|
2
|
+
'editor.font.heading.h1': 'normal 500 1.71429em/1.16667 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
3
|
+
'editor.font.heading.h2': 'normal 500 1.42857em/1.2 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
4
|
+
'editor.font.heading.h3': 'normal 600 1.14286em/1.25 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
5
|
+
'editor.font.heading.h4': 'normal 600 1em/1.14286 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
6
|
+
'editor.font.heading.h5': 'normal 600 0.857143em/1.33333 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
7
|
+
'editor.font.heading.h6': 'normal 700 0.785714em/1.45455 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
8
|
+
'editor.font.body': 'normal 400 1em/1.714 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif'
|
|
9
|
+
};
|
|
10
|
+
export var editorUGCTokensModernized = {
|
|
11
|
+
'editor.font.heading.h1': 'normal 700 1.71429em/1.16667 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
12
|
+
'editor.font.heading.h2': 'normal 700 1.42857em/1.2 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
13
|
+
'editor.font.heading.h3': 'normal 700 1.14286em/1.25 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
14
|
+
'editor.font.heading.h4': 'normal 700 1em/1.14286 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
15
|
+
'editor.font.heading.h5': 'normal 700 0.857143em/1.33333 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
16
|
+
'editor.font.heading.h6': 'normal 700 0.785714em/1.45455 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
17
|
+
'editor.font.body': 'normal 400 1em/1.714 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif'
|
|
18
|
+
};
|
|
19
|
+
export var editorUGCTokensRefreshed = {
|
|
20
|
+
'editor.font.heading.h1': 'normal 700 1.71429em/1.16667 "Inter Variable", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
21
|
+
'editor.font.heading.h2': 'normal 700 1.42857em/1.2 "Inter Variable", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
22
|
+
'editor.font.heading.h3': 'normal 7001.14286em/1.25 "Inter Variable", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
23
|
+
'editor.font.heading.h4': 'normal 700 1em/1.14286 "Inter Variable", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
24
|
+
'editor.font.heading.h5': 'normal 700 0.857143em/1.33333 "Inter Variable", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
25
|
+
'editor.font.heading.h6': 'normal 700 0.785714em/1.45455 "Inter Variable", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
26
|
+
'editor.font.body': 'normal 400 1em/1.714 "Inter Variable", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif'
|
|
27
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { editorUGCTokens, editorUGCTokensModernized, editorUGCTokensRefreshed } from './editor-ugc-token-names';
|
|
2
|
+
function editorUGCToken(path, typographyTheme) {
|
|
3
|
+
var token;
|
|
4
|
+
switch (typographyTheme) {
|
|
5
|
+
case 'typography-modernized':
|
|
6
|
+
token = editorUGCTokensModernized[path];
|
|
7
|
+
break;
|
|
8
|
+
case 'typography-refreshed':
|
|
9
|
+
token = editorUGCTokensRefreshed[path];
|
|
10
|
+
break;
|
|
11
|
+
default:
|
|
12
|
+
token = editorUGCTokens[path];
|
|
13
|
+
break;
|
|
14
|
+
}
|
|
15
|
+
return token;
|
|
16
|
+
}
|
|
17
|
+
export default editorUGCToken;
|
|
@@ -21,7 +21,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
21
21
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "93.4.
|
|
24
|
+
var packageVersion = "93.4.3";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -12,6 +12,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
12
12
|
import React, { Component } from 'react';
|
|
13
13
|
import Popper from 'popper.js'; // eslint-disable-line import/extensions
|
|
14
14
|
import rafSchedule from 'raf-schd';
|
|
15
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
16
|
import { positionPropToPopperPosition } from './internal/helpers';
|
|
16
17
|
var defaultState = {
|
|
17
18
|
hasExtractedStyles: false,
|
|
@@ -68,13 +69,18 @@ var Layer = /*#__PURE__*/function (_Component) {
|
|
|
68
69
|
}, {
|
|
69
70
|
key: "UNSAFE_componentWillReceiveProps",
|
|
70
71
|
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
71
|
-
|
|
72
|
+
if (!fg('platform_editor_react18_phase2')) {
|
|
73
|
+
this.applyPopper(nextProps);
|
|
74
|
+
}
|
|
72
75
|
}
|
|
73
76
|
}, {
|
|
74
77
|
key: "componentDidUpdate",
|
|
75
78
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
76
79
|
var onPositioned = this.props.onPositioned;
|
|
77
80
|
var hasExtractedStyles = this.state.hasExtractedStyles;
|
|
81
|
+
if (this.props !== prevProps && fg('platform_editor_react18_phase2')) {
|
|
82
|
+
this.applyPopper(this.props);
|
|
83
|
+
}
|
|
78
84
|
|
|
79
85
|
// This flag is set the first time the position is calculated from Popper and applied to the content
|
|
80
86
|
if (!prevState.hasExtractedStyles && hasExtractedStyles && onPositioned) {
|
|
@@ -14,6 +14,7 @@ export type EditorAnalyticsAPI = {
|
|
|
14
14
|
* fireAnalyticsEvent is used to fire an analytics payloads directly
|
|
15
15
|
*
|
|
16
16
|
* @param {AnalyticsEventPayload} payload - analytics payload
|
|
17
|
+
* @param {string} [channel="editor"] - optional channel identifier
|
|
17
18
|
*/
|
|
18
|
-
fireAnalyticsEvent: (payload: AnalyticsEventPayload) => void | undefined;
|
|
19
|
+
fireAnalyticsEvent: (payload: AnalyticsEventPayload, channel?: string) => void | undefined;
|
|
19
20
|
};
|
|
@@ -81,6 +81,7 @@ export declare enum ACTION {
|
|
|
81
81
|
PASTED = "pasted",
|
|
82
82
|
PASTED_AS_PLAIN = "pastedAsPlain",
|
|
83
83
|
PASTED_TIMED = "pastedTimed",
|
|
84
|
+
PRESSED = "pressed",
|
|
84
85
|
PROSEMIRROR_RENDERED = "proseMirrorRendered",
|
|
85
86
|
REACT_NODEVIEW_RENDERED = "reactNodeViewRendered",
|
|
86
87
|
REPLACED_ALL = "replacedAll",
|
|
@@ -218,11 +219,13 @@ export declare enum ACTION_SUBJECT {
|
|
|
218
219
|
FLOATING_CONTEXTUAL_BUTTON = "floatingContextualButton",
|
|
219
220
|
FLOATING_TOOLBAR_PLUGIN = "floatingToolbarPlugin",
|
|
220
221
|
HELP = "help",
|
|
222
|
+
INVITE_ITEM = "inviteItem",
|
|
221
223
|
LAYOUT = "layout",
|
|
222
224
|
LIST = "list",
|
|
223
225
|
MEDIA = "media",
|
|
224
226
|
MEDIA_SINGLE = "mediaSingle",
|
|
225
227
|
MENTION = "mention",
|
|
228
|
+
MENTION_TYPEAHEAD = "mentionTypeahead",
|
|
226
229
|
NESTED_EXPAND = "nestedExpand",
|
|
227
230
|
PANEL = "panel",
|
|
228
231
|
PICKER = "picker",
|
|
@@ -235,6 +238,7 @@ export declare enum ACTION_SUBJECT {
|
|
|
235
238
|
HYPERLINK = "hyperlink",
|
|
236
239
|
TABLE = "table",
|
|
237
240
|
TABLES_PLUGIN = "tablesPlugin",
|
|
241
|
+
TEAM_MENTION_TYPEAHEAD = "teamMentionTypeahead",
|
|
238
242
|
TEXT = "text",
|
|
239
243
|
TOOLBAR = "toolbar",
|
|
240
244
|
TYPEAHEAD = "typeAhead",
|
|
@@ -26,6 +26,7 @@ import type { CreateLinkInlineDialogEventPayload, EditLinkToolbarAEP, OpenSettin
|
|
|
26
26
|
import type { ListEventPayload } from './list-events';
|
|
27
27
|
import type { LoomEventPayload } from './loom-events';
|
|
28
28
|
import type { MediaEventPayload } from './media-events';
|
|
29
|
+
import { type MentionEventPayload } from './mention-events';
|
|
29
30
|
import type { MoveContentEventPayload } from './move-content-events';
|
|
30
31
|
import type { NodeEventPayload } from './node-events';
|
|
31
32
|
import type { PasteEventPayload } from './paste-events';
|
|
@@ -45,7 +46,7 @@ export type SimplifiedNode = {
|
|
|
45
46
|
marks?: string[];
|
|
46
47
|
content?: SimplifiedNode[];
|
|
47
48
|
};
|
|
48
|
-
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | EngagementPlatformEventPayload;
|
|
49
|
+
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload;
|
|
49
50
|
type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
|
|
50
51
|
previousColor: string;
|
|
51
52
|
newColor: string;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { type ComponentNames, type Actions as MentionActions, type SliNames } from '@atlaskit/mention/types';
|
|
2
|
+
import { type ACTION, type ACTION_SUBJECT, type ACTION_SUBJECT_ID } from './enums';
|
|
3
|
+
import { type OperationalAEP, type UIAEP } from './utils';
|
|
4
|
+
type MentionTypeaheadCancelledEventPayload = UIAEP<ACTION.CANCELLED, ACTION_SUBJECT.MENTION_TYPEAHEAD, undefined, {
|
|
5
|
+
componentName: string;
|
|
6
|
+
duration: number;
|
|
7
|
+
queryLength?: number;
|
|
8
|
+
spaceInQuery?: boolean;
|
|
9
|
+
upKeyCount: number;
|
|
10
|
+
downKeyCount: number;
|
|
11
|
+
sessionId: string;
|
|
12
|
+
}, undefined>;
|
|
13
|
+
type MentionTypeaheadInviteItemViewedPayload = UIAEP<ACTION.RENDERED, ACTION_SUBJECT.INVITE_ITEM, undefined, {
|
|
14
|
+
componentName: string;
|
|
15
|
+
containerId: string;
|
|
16
|
+
objectId: string;
|
|
17
|
+
childObjectId?: string;
|
|
18
|
+
userRole?: string;
|
|
19
|
+
sessionId: string;
|
|
20
|
+
}, undefined>;
|
|
21
|
+
type MentionTypeaheadInviteItemClickedPayload = UIAEP<ACTION.CLICKED | ACTION.PRESSED, ACTION_SUBJECT.INVITE_ITEM, undefined, {
|
|
22
|
+
componentName: string;
|
|
23
|
+
duration: number;
|
|
24
|
+
queryLength?: number;
|
|
25
|
+
spaceInQuery?: boolean;
|
|
26
|
+
upKeyCount: number;
|
|
27
|
+
downKeyCount: number;
|
|
28
|
+
containerId: string;
|
|
29
|
+
objectId: string;
|
|
30
|
+
childObjectId?: string;
|
|
31
|
+
userRole?: string;
|
|
32
|
+
sessionId: string;
|
|
33
|
+
keyboardKey?: string;
|
|
34
|
+
}, undefined>;
|
|
35
|
+
type MentionTypeaheadInsertedPayload = UIAEP<ACTION.CLICKED | ACTION.PRESSED, ACTION_SUBJECT.MENTION_TYPEAHEAD, undefined, {
|
|
36
|
+
sessionId: string;
|
|
37
|
+
duration: number;
|
|
38
|
+
position?: number;
|
|
39
|
+
keyboardKey?: string;
|
|
40
|
+
source?: string;
|
|
41
|
+
queryLength?: number;
|
|
42
|
+
spaceInQuery?: boolean;
|
|
43
|
+
isSpecial: boolean;
|
|
44
|
+
accessLevel: string;
|
|
45
|
+
userType?: string;
|
|
46
|
+
userId: string;
|
|
47
|
+
upKeyCount: number;
|
|
48
|
+
downKeyCount: number;
|
|
49
|
+
memberCount?: number | null;
|
|
50
|
+
includesYou?: boolean | null;
|
|
51
|
+
taskListId?: string;
|
|
52
|
+
taskItemId?: string;
|
|
53
|
+
localId?: string;
|
|
54
|
+
containerId?: string;
|
|
55
|
+
objectId?: string;
|
|
56
|
+
childObjectId?: string;
|
|
57
|
+
}, undefined>;
|
|
58
|
+
type MentionTypeaheadRenderedPayload = OperationalAEP<ACTION.RENDERED, ACTION_SUBJECT.MENTION_TYPEAHEAD | ACTION_SUBJECT.TEAM_MENTION_TYPEAHEAD, undefined, {
|
|
59
|
+
componentName: string;
|
|
60
|
+
duration: number;
|
|
61
|
+
userIds: Array<string> | null;
|
|
62
|
+
teams: Array<{
|
|
63
|
+
teamId: string;
|
|
64
|
+
includesYou: boolean;
|
|
65
|
+
memberCount: number;
|
|
66
|
+
}> | null;
|
|
67
|
+
queryLength?: number;
|
|
68
|
+
spaceInQuery?: boolean;
|
|
69
|
+
}>;
|
|
70
|
+
type MentionProviderErroredPayload = OperationalAEP<ACTION.ERRORED, ACTION_SUBJECT.MENTION, ACTION_SUBJECT_ID.MENTION_PROVIDER, {
|
|
71
|
+
reason: string;
|
|
72
|
+
}>;
|
|
73
|
+
export type MentionAttributes = {
|
|
74
|
+
[key: string]: string;
|
|
75
|
+
};
|
|
76
|
+
type MentionSliEventPayload = OperationalAEP<MentionActions, ComponentNames | SliNames, undefined, {
|
|
77
|
+
componentName: string;
|
|
78
|
+
} & MentionAttributes>;
|
|
79
|
+
export type MentionEventPayload = MentionTypeaheadCancelledEventPayload | MentionTypeaheadInviteItemViewedPayload | MentionTypeaheadInviteItemClickedPayload | MentionTypeaheadInsertedPayload | MentionTypeaheadRenderedPayload | MentionProviderErroredPayload | MentionSliEventPayload;
|
|
80
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const headingsSharedStyles: () => import("@emotion/react").SerializedStyles;
|
|
1
|
+
export declare const headingsSharedStyles: (typographyTheme?: 'typography' | 'typography-adg3' | 'typography-modernized' | 'typography-refreshed') => import("@emotion/react").SerializedStyles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const paragraphSharedStyles: import("@emotion/react").SerializedStyles;
|
|
1
|
+
export declare const paragraphSharedStyles: (typographyTheme?: 'typography' | 'typography-adg3' | 'typography-modernized' | 'typography-refreshed') => import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type EditorUGCTokens = {
|
|
2
|
+
'editor.font.heading.h1': string;
|
|
3
|
+
'editor.font.heading.h2': string;
|
|
4
|
+
'editor.font.heading.h3': string;
|
|
5
|
+
'editor.font.heading.h4': string;
|
|
6
|
+
'editor.font.heading.h5': string;
|
|
7
|
+
'editor.font.heading.h6': string;
|
|
8
|
+
'editor.font.body': string;
|
|
9
|
+
};
|
|
10
|
+
export declare const editorUGCTokens: EditorUGCTokens;
|
|
11
|
+
export declare const editorUGCTokensModernized: EditorUGCTokens;
|
|
12
|
+
export declare const editorUGCTokensRefreshed: EditorUGCTokens;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type EditorUGCTokens } from './editor-ugc-token-names';
|
|
2
|
+
declare function editorUGCToken<T extends keyof EditorUGCTokens>(path: T, typographyTheme: 'typography' | 'typography-adg3' | 'typography-modernized' | 'typography-refreshed' | undefined): string;
|
|
3
|
+
export default editorUGCToken;
|
|
@@ -14,6 +14,7 @@ export type EditorAnalyticsAPI = {
|
|
|
14
14
|
* fireAnalyticsEvent is used to fire an analytics payloads directly
|
|
15
15
|
*
|
|
16
16
|
* @param {AnalyticsEventPayload} payload - analytics payload
|
|
17
|
+
* @param {string} [channel="editor"] - optional channel identifier
|
|
17
18
|
*/
|
|
18
|
-
fireAnalyticsEvent: (payload: AnalyticsEventPayload) => void | undefined;
|
|
19
|
+
fireAnalyticsEvent: (payload: AnalyticsEventPayload, channel?: string) => void | undefined;
|
|
19
20
|
};
|
|
@@ -81,6 +81,7 @@ export declare enum ACTION {
|
|
|
81
81
|
PASTED = "pasted",
|
|
82
82
|
PASTED_AS_PLAIN = "pastedAsPlain",
|
|
83
83
|
PASTED_TIMED = "pastedTimed",
|
|
84
|
+
PRESSED = "pressed",
|
|
84
85
|
PROSEMIRROR_RENDERED = "proseMirrorRendered",
|
|
85
86
|
REACT_NODEVIEW_RENDERED = "reactNodeViewRendered",
|
|
86
87
|
REPLACED_ALL = "replacedAll",
|
|
@@ -218,11 +219,13 @@ export declare enum ACTION_SUBJECT {
|
|
|
218
219
|
FLOATING_CONTEXTUAL_BUTTON = "floatingContextualButton",
|
|
219
220
|
FLOATING_TOOLBAR_PLUGIN = "floatingToolbarPlugin",
|
|
220
221
|
HELP = "help",
|
|
222
|
+
INVITE_ITEM = "inviteItem",
|
|
221
223
|
LAYOUT = "layout",
|
|
222
224
|
LIST = "list",
|
|
223
225
|
MEDIA = "media",
|
|
224
226
|
MEDIA_SINGLE = "mediaSingle",
|
|
225
227
|
MENTION = "mention",
|
|
228
|
+
MENTION_TYPEAHEAD = "mentionTypeahead",
|
|
226
229
|
NESTED_EXPAND = "nestedExpand",
|
|
227
230
|
PANEL = "panel",
|
|
228
231
|
PICKER = "picker",
|
|
@@ -235,6 +238,7 @@ export declare enum ACTION_SUBJECT {
|
|
|
235
238
|
HYPERLINK = "hyperlink",
|
|
236
239
|
TABLE = "table",
|
|
237
240
|
TABLES_PLUGIN = "tablesPlugin",
|
|
241
|
+
TEAM_MENTION_TYPEAHEAD = "teamMentionTypeahead",
|
|
238
242
|
TEXT = "text",
|
|
239
243
|
TOOLBAR = "toolbar",
|
|
240
244
|
TYPEAHEAD = "typeAhead",
|
|
@@ -26,6 +26,7 @@ import type { CreateLinkInlineDialogEventPayload, EditLinkToolbarAEP, OpenSettin
|
|
|
26
26
|
import type { ListEventPayload } from './list-events';
|
|
27
27
|
import type { LoomEventPayload } from './loom-events';
|
|
28
28
|
import type { MediaEventPayload } from './media-events';
|
|
29
|
+
import { type MentionEventPayload } from './mention-events';
|
|
29
30
|
import type { MoveContentEventPayload } from './move-content-events';
|
|
30
31
|
import type { NodeEventPayload } from './node-events';
|
|
31
32
|
import type { PasteEventPayload } from './paste-events';
|
|
@@ -45,7 +46,7 @@ export type SimplifiedNode = {
|
|
|
45
46
|
marks?: string[];
|
|
46
47
|
content?: SimplifiedNode[];
|
|
47
48
|
};
|
|
48
|
-
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | EngagementPlatformEventPayload;
|
|
49
|
+
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload;
|
|
49
50
|
type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
|
|
50
51
|
previousColor: string;
|
|
51
52
|
newColor: string;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { type ComponentNames, type Actions as MentionActions, type SliNames } from '@atlaskit/mention/types';
|
|
2
|
+
import { type ACTION, type ACTION_SUBJECT, type ACTION_SUBJECT_ID } from './enums';
|
|
3
|
+
import { type OperationalAEP, type UIAEP } from './utils';
|
|
4
|
+
type MentionTypeaheadCancelledEventPayload = UIAEP<ACTION.CANCELLED, ACTION_SUBJECT.MENTION_TYPEAHEAD, undefined, {
|
|
5
|
+
componentName: string;
|
|
6
|
+
duration: number;
|
|
7
|
+
queryLength?: number;
|
|
8
|
+
spaceInQuery?: boolean;
|
|
9
|
+
upKeyCount: number;
|
|
10
|
+
downKeyCount: number;
|
|
11
|
+
sessionId: string;
|
|
12
|
+
}, undefined>;
|
|
13
|
+
type MentionTypeaheadInviteItemViewedPayload = UIAEP<ACTION.RENDERED, ACTION_SUBJECT.INVITE_ITEM, undefined, {
|
|
14
|
+
componentName: string;
|
|
15
|
+
containerId: string;
|
|
16
|
+
objectId: string;
|
|
17
|
+
childObjectId?: string;
|
|
18
|
+
userRole?: string;
|
|
19
|
+
sessionId: string;
|
|
20
|
+
}, undefined>;
|
|
21
|
+
type MentionTypeaheadInviteItemClickedPayload = UIAEP<ACTION.CLICKED | ACTION.PRESSED, ACTION_SUBJECT.INVITE_ITEM, undefined, {
|
|
22
|
+
componentName: string;
|
|
23
|
+
duration: number;
|
|
24
|
+
queryLength?: number;
|
|
25
|
+
spaceInQuery?: boolean;
|
|
26
|
+
upKeyCount: number;
|
|
27
|
+
downKeyCount: number;
|
|
28
|
+
containerId: string;
|
|
29
|
+
objectId: string;
|
|
30
|
+
childObjectId?: string;
|
|
31
|
+
userRole?: string;
|
|
32
|
+
sessionId: string;
|
|
33
|
+
keyboardKey?: string;
|
|
34
|
+
}, undefined>;
|
|
35
|
+
type MentionTypeaheadInsertedPayload = UIAEP<ACTION.CLICKED | ACTION.PRESSED, ACTION_SUBJECT.MENTION_TYPEAHEAD, undefined, {
|
|
36
|
+
sessionId: string;
|
|
37
|
+
duration: number;
|
|
38
|
+
position?: number;
|
|
39
|
+
keyboardKey?: string;
|
|
40
|
+
source?: string;
|
|
41
|
+
queryLength?: number;
|
|
42
|
+
spaceInQuery?: boolean;
|
|
43
|
+
isSpecial: boolean;
|
|
44
|
+
accessLevel: string;
|
|
45
|
+
userType?: string;
|
|
46
|
+
userId: string;
|
|
47
|
+
upKeyCount: number;
|
|
48
|
+
downKeyCount: number;
|
|
49
|
+
memberCount?: number | null;
|
|
50
|
+
includesYou?: boolean | null;
|
|
51
|
+
taskListId?: string;
|
|
52
|
+
taskItemId?: string;
|
|
53
|
+
localId?: string;
|
|
54
|
+
containerId?: string;
|
|
55
|
+
objectId?: string;
|
|
56
|
+
childObjectId?: string;
|
|
57
|
+
}, undefined>;
|
|
58
|
+
type MentionTypeaheadRenderedPayload = OperationalAEP<ACTION.RENDERED, ACTION_SUBJECT.MENTION_TYPEAHEAD | ACTION_SUBJECT.TEAM_MENTION_TYPEAHEAD, undefined, {
|
|
59
|
+
componentName: string;
|
|
60
|
+
duration: number;
|
|
61
|
+
userIds: Array<string> | null;
|
|
62
|
+
teams: Array<{
|
|
63
|
+
teamId: string;
|
|
64
|
+
includesYou: boolean;
|
|
65
|
+
memberCount: number;
|
|
66
|
+
}> | null;
|
|
67
|
+
queryLength?: number;
|
|
68
|
+
spaceInQuery?: boolean;
|
|
69
|
+
}>;
|
|
70
|
+
type MentionProviderErroredPayload = OperationalAEP<ACTION.ERRORED, ACTION_SUBJECT.MENTION, ACTION_SUBJECT_ID.MENTION_PROVIDER, {
|
|
71
|
+
reason: string;
|
|
72
|
+
}>;
|
|
73
|
+
export type MentionAttributes = {
|
|
74
|
+
[key: string]: string;
|
|
75
|
+
};
|
|
76
|
+
type MentionSliEventPayload = OperationalAEP<MentionActions, ComponentNames | SliNames, undefined, {
|
|
77
|
+
componentName: string;
|
|
78
|
+
} & MentionAttributes>;
|
|
79
|
+
export type MentionEventPayload = MentionTypeaheadCancelledEventPayload | MentionTypeaheadInviteItemViewedPayload | MentionTypeaheadInviteItemClickedPayload | MentionTypeaheadInsertedPayload | MentionTypeaheadRenderedPayload | MentionProviderErroredPayload | MentionSliEventPayload;
|
|
80
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const headingsSharedStyles: () => import("@emotion/react").SerializedStyles;
|
|
1
|
+
export declare const headingsSharedStyles: (typographyTheme?: 'typography' | 'typography-adg3' | 'typography-modernized' | 'typography-refreshed') => import("@emotion/react").SerializedStyles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const paragraphSharedStyles: import("@emotion/react").SerializedStyles;
|
|
1
|
+
export declare const paragraphSharedStyles: (typographyTheme?: 'typography' | 'typography-adg3' | 'typography-modernized' | 'typography-refreshed') => import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type EditorUGCTokens = {
|
|
2
|
+
'editor.font.heading.h1': string;
|
|
3
|
+
'editor.font.heading.h2': string;
|
|
4
|
+
'editor.font.heading.h3': string;
|
|
5
|
+
'editor.font.heading.h4': string;
|
|
6
|
+
'editor.font.heading.h5': string;
|
|
7
|
+
'editor.font.heading.h6': string;
|
|
8
|
+
'editor.font.body': string;
|
|
9
|
+
};
|
|
10
|
+
export declare const editorUGCTokens: EditorUGCTokens;
|
|
11
|
+
export declare const editorUGCTokensModernized: EditorUGCTokens;
|
|
12
|
+
export declare const editorUGCTokensRefreshed: EditorUGCTokens;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type EditorUGCTokens } from './editor-ugc-token-names';
|
|
2
|
+
declare function editorUGCToken<T extends keyof EditorUGCTokens>(path: T, typographyTheme: 'typography' | 'typography-adg3' | 'typography-modernized' | 'typography-refreshed' | undefined): string;
|
|
3
|
+
export default editorUGCToken;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "93.4.
|
|
3
|
+
"version": "93.4.3",
|
|
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/"
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
"@atlaskit/icon-object": "^6.5.0",
|
|
131
131
|
"@atlaskit/link-datasource": "^3.6.0",
|
|
132
132
|
"@atlaskit/link-picker": "^1.47.0",
|
|
133
|
-
"@atlaskit/media-card": "^78.
|
|
133
|
+
"@atlaskit/media-card": "^78.6.0",
|
|
134
134
|
"@atlaskit/media-client": "^28.0.0",
|
|
135
135
|
"@atlaskit/media-client-react": "^2.2.0",
|
|
136
136
|
"@atlaskit/media-common": "^11.6.0",
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
"@atlaskit/spinner": "^16.3.0",
|
|
151
151
|
"@atlaskit/task-decision": "^17.11.0",
|
|
152
152
|
"@atlaskit/textfield": "^6.5.0",
|
|
153
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
153
|
+
"@atlaskit/tmp-editor-statsig": "^2.4.0",
|
|
154
154
|
"@atlaskit/tokens": "^2.0.0",
|
|
155
155
|
"@atlaskit/tooltip": "^18.8.0",
|
|
156
156
|
"@atlaskit/ufo": "^0.3.0",
|