@atlaskit/editor-common 94.4.0 → 94.5.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 +26 -0
- package/dist/cjs/analytics/types/enums.js +3 -0
- package/dist/cjs/element-browser/components/ElementList/ElementList.js +2 -2
- package/dist/cjs/media/messages/caption.js +5 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/styles/shared/headings.js +2 -2
- package/dist/cjs/styles/shared/paragraph.js +2 -2
- package/dist/cjs/ui/DropList/index.js +15 -10
- package/dist/cjs/ui/Emoji/index.js +17 -9
- package/dist/cjs/ui-menu/Dropdown/index.js +13 -7
- package/dist/cjs/ui-menu/DropdownMenu/index.js +11 -3
- package/dist/cjs/ui-react/index.js +10 -1
- package/dist/cjs/ui-react/with-react-editor-view-outer-listeners.js +24 -13
- package/dist/es2019/analytics/types/enums.js +3 -0
- package/dist/es2019/element-browser/components/ElementList/ElementList.js +2 -2
- package/dist/es2019/media/messages/caption.js +5 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/styles/shared/headings.js +2 -2
- package/dist/es2019/styles/shared/paragraph.js +2 -2
- package/dist/es2019/ui/DropList/index.js +7 -2
- package/dist/es2019/ui/Emoji/index.js +10 -8
- package/dist/es2019/ui-menu/Dropdown/index.js +6 -5
- package/dist/es2019/ui-menu/DropdownMenu/index.js +12 -4
- package/dist/es2019/ui-react/index.js +1 -1
- package/dist/es2019/ui-react/with-react-editor-view-outer-listeners.js +23 -14
- package/dist/esm/analytics/types/enums.js +3 -0
- package/dist/esm/element-browser/components/ElementList/ElementList.js +2 -2
- package/dist/esm/media/messages/caption.js +5 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/styles/shared/headings.js +2 -2
- package/dist/esm/styles/shared/paragraph.js +2 -2
- package/dist/esm/ui/DropList/index.js +15 -10
- package/dist/esm/ui/Emoji/index.js +14 -8
- package/dist/esm/ui-menu/Dropdown/index.js +14 -8
- package/dist/esm/ui-menu/DropdownMenu/index.js +12 -4
- package/dist/esm/ui-react/index.js +1 -1
- package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +23 -14
- package/dist/types/analytics/types/enums.d.ts +5 -2
- package/dist/types/analytics/types/index.d.ts +1 -1
- package/dist/types/analytics/types/media-events.d.ts +6 -2
- package/dist/types/media/messages/caption.d.ts +5 -0
- package/dist/types/ui/DropList/index.d.ts +6 -2
- package/dist/types/ui/Emoji/index.d.ts +3 -3
- package/dist/types/ui/index.d.ts +1 -1
- package/dist/types/ui-react/index.d.ts +1 -1
- package/dist/types/ui-react/with-react-editor-view-outer-listeners.d.ts +1 -0
- package/dist/types-ts4.5/analytics/types/enums.d.ts +5 -2
- package/dist/types-ts4.5/analytics/types/index.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/media-events.d.ts +6 -2
- package/dist/types-ts4.5/media/messages/caption.d.ts +5 -0
- package/dist/types-ts4.5/ui/DropList/index.d.ts +6 -2
- package/dist/types-ts4.5/ui/Emoji/index.d.ts +3 -3
- package/dist/types-ts4.5/ui/index.d.ts +1 -1
- package/dist/types-ts4.5/ui-react/index.d.ts +1 -1
- package/dist/types-ts4.5/ui-react/with-react-editor-view-outer-listeners.d.ts +1 -0
- package/package.json +9 -3
|
@@ -4,8 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { ReactNode } from 'react';
|
|
6
6
|
import type { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
7
|
-
interface Props extends WithAnalyticsEventsProps {
|
|
7
|
+
export interface Props extends WithAnalyticsEventsProps {
|
|
8
8
|
isOpen?: boolean;
|
|
9
|
+
appearance?: string;
|
|
10
|
+
shouldFlip?: boolean;
|
|
11
|
+
isTriggerNotTabbable?: boolean;
|
|
9
12
|
trigger?: React.ReactNode;
|
|
10
13
|
position: string;
|
|
11
14
|
onOpenChange?: (event: OpenChangedEvent) => void;
|
|
@@ -14,10 +17,11 @@ interface Props extends WithAnalyticsEventsProps {
|
|
|
14
17
|
shouldFitContainer: boolean;
|
|
15
18
|
children?: ReactNode;
|
|
16
19
|
id?: string;
|
|
20
|
+
onDroplistRef?: (ref: HTMLDivElement | null) => unknown;
|
|
17
21
|
}
|
|
18
22
|
export type OpenChangedEvent = {
|
|
19
23
|
isOpen: boolean;
|
|
20
24
|
event: MouseEvent | KeyboardEvent;
|
|
21
25
|
};
|
|
22
|
-
declare const _default: import("react").ForwardRefExoticComponent<Pick<Omit<Props, keyof WithAnalyticsEventsProps> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "position" | "key" | "id" | "children" | "testId" | "analyticsContext" | "shouldFitContainer" | "onPositioned" | "isOpen" | "trigger" | "onOpenChange"> & import("react").RefAttributes<any>>;
|
|
26
|
+
declare const _default: import("react").ForwardRefExoticComponent<Pick<Omit<Props, keyof WithAnalyticsEventsProps> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "appearance" | "position" | "key" | "id" | "children" | "testId" | "analyticsContext" | "shouldFitContainer" | "onPositioned" | "isOpen" | "shouldFlip" | "isTriggerNotTabbable" | "trigger" | "onOpenChange" | "onDroplistRef"> & import("react").RefAttributes<any>>;
|
|
23
27
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { EmojiProvider, EmojiResourceConfig } from '@atlaskit/emoji/resource';
|
|
3
3
|
import type { EmojiId } from '@atlaskit/emoji/types';
|
|
4
4
|
import { type ProviderFactory } from '../../provider-factory';
|
|
@@ -10,5 +10,5 @@ export interface EmojiProps extends EmojiId {
|
|
|
10
10
|
resourceConfig?: EmojiResourceConfig;
|
|
11
11
|
emojiProvider?: EmojiProvider;
|
|
12
12
|
}
|
|
13
|
-
declare const
|
|
14
|
-
export default
|
|
13
|
+
declare const _default: React.MemoExoticComponent<(props: EmojiProps) => JSX.Element>;
|
|
14
|
+
export default _default;
|
package/dist/types/ui/index.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export { panelTextInput } from './PanelTextInput/styles';
|
|
|
39
39
|
export { default as PanelTextInput } from './PanelTextInput';
|
|
40
40
|
export { default as Announcer } from './Announcer/announcer';
|
|
41
41
|
export { EDIT_AREA_ID } from './Toolbar';
|
|
42
|
-
export { default as DropList } from './DropList';
|
|
42
|
+
export { default as DropList, type Props as DropListProps } from './DropList';
|
|
43
43
|
export type { UseStickyToolbarType } from './Toolbar';
|
|
44
44
|
export type { OpenChangedEvent } from './DropList';
|
|
45
45
|
export { sharedMultiBodiedExtensionStyles } from './MultiBodiedExtension';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as ReactEditorViewContext } from './ReactEditorViewContext';
|
|
2
|
-
export { default as withReactEditorViewOuterListeners } from './with-react-editor-view-outer-listeners';
|
|
2
|
+
export { default as withReactEditorViewOuterListeners, OutsideClickTargetRefContext, } from './with-react-editor-view-outer-listeners';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
type SimpleEventHandler<T> = (event: T) => void;
|
|
3
|
+
export declare const OutsideClickTargetRefContext: React.Context<(el: HTMLElement | null) => void>;
|
|
3
4
|
export interface WithOutsideClickProps {
|
|
4
5
|
handleClickOutside?: SimpleEventHandler<MouseEvent>;
|
|
5
6
|
handleEscapeKeydown?: SimpleEventHandler<KeyboardEvent>;
|
|
@@ -37,6 +37,7 @@ export declare enum ACTION {
|
|
|
37
37
|
DISMISSED = "dismissed",
|
|
38
38
|
DISPATCHED_INVALID_TRANSACTION = "dispatchedInvalidTransaction",
|
|
39
39
|
DISPATCHED_VALID_TRANSACTION = "dispatchedValidTransaction",
|
|
40
|
+
DOUBLE_CLICKED = "doubleClicked",
|
|
40
41
|
DRAGGED = "dragged",
|
|
41
42
|
EDITED = "edited",
|
|
42
43
|
EDITOR_CRASHED = "unhandledErrorCaught",
|
|
@@ -185,7 +186,8 @@ export declare enum INPUT_METHOD {
|
|
|
185
186
|
DATASOURCE = "datasource_config",
|
|
186
187
|
TABLE_CONTEXT_MENU = "tableContextMenu",
|
|
187
188
|
MOUSE = "mouse",
|
|
188
|
-
BROWSER = "browser"
|
|
189
|
+
BROWSER = "browser",
|
|
190
|
+
DOUBLE_CLICK = "doubleClick"
|
|
189
191
|
}
|
|
190
192
|
export declare enum INSERT_MEDIA_VIA {
|
|
191
193
|
LOCAL_UPLOAD = "localUpload",
|
|
@@ -259,7 +261,8 @@ export declare enum ACTION_SUBJECT {
|
|
|
259
261
|
ELEMENT = "element",
|
|
260
262
|
CONTEXT_MENU = "contextMenu",
|
|
261
263
|
INLINE_DIALOG = "inlineDialog",
|
|
262
|
-
ENGAGEMENT_PLATFORM = "engagementPlatform"
|
|
264
|
+
ENGAGEMENT_PLATFORM = "engagementPlatform",
|
|
265
|
+
MEDIA_VIEWER = "mediaViewer"
|
|
263
266
|
}
|
|
264
267
|
export declare enum ACTION_SUBJECT_ID {
|
|
265
268
|
ACTION = "action",
|
|
@@ -12,7 +12,7 @@ export { CHANGE_ALIGNMENT_REASON, TABLE_ACTION, TABLE_BREAKOUT, TABLE_OVERFLOW_C
|
|
|
12
12
|
export type { TableEventPayload, OverflowStateInfo } from './table-events';
|
|
13
13
|
export { PasteContents, PasteSources, PasteTypes } from './paste-events';
|
|
14
14
|
export type { PASTE_ACTION_SUBJECT_ID, PasteContent, PasteEventPayload, PasteSource, PasteType, } from './paste-events';
|
|
15
|
-
export type { MediaSwitchType, MediaAltTextActionType, MediaEventPayload, MediaLinkAEP, CaptionTrackAction, MediaResizeTrackAction, MediaInputResizeTrackAction, } from './media-events';
|
|
15
|
+
export type { MediaSwitchType, MediaAltTextActionType, MediaEventPayload, MediaLinkAEP, CaptionTrackAction, MediaResizeTrackAction, MediaInputResizeTrackAction, MediaViewerEventAction, } from './media-events';
|
|
16
16
|
export type { MoveContentEventPayload } from './move-content-events';
|
|
17
17
|
export type { DispatchAnalyticsEvent } from './dispatch-analytics-event';
|
|
18
18
|
export { DELETE_DIRECTION, LIST_TEXT_SCENARIOS, JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST, OUTDENT_SCENARIOS, } from './list-events';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RichMediaLayout } from '@atlaskit/adf-schema';
|
|
2
2
|
import type { GuidelineTypes, WidthTypes } from '../../guideline/types';
|
|
3
|
-
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
|
|
3
|
+
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, INPUT_METHOD } from './enums';
|
|
4
4
|
import type { EventInput } from './type-ahead';
|
|
5
5
|
import type { ChangeTypeAEP, TrackAEP, UIAEP } from './utils';
|
|
6
6
|
type MediaBorderActionType = ACTION.UPDATED | ACTION.ADDED | ACTION.DELETED;
|
|
@@ -37,6 +37,10 @@ type ChangeMediaAEP = ChangeTypeAEP<ACTION_SUBJECT.MEDIA, undefined, {
|
|
|
37
37
|
newType: MediaSwitchType;
|
|
38
38
|
previousType: MediaSwitchType;
|
|
39
39
|
}, undefined>;
|
|
40
|
+
export type MediaViewerEventAction = UIAEP<ACTION.OPENED, ACTION_SUBJECT.MEDIA_VIEWER, ACTION_SUBJECT_ID.MEDIA, {
|
|
41
|
+
nodeType: string;
|
|
42
|
+
inputMethod: INPUT_METHOD.DOUBLE_CLICK;
|
|
43
|
+
}, undefined>;
|
|
40
44
|
export type MediaAltTextActionType = ACTION.ADDED | ACTION.CLOSED | ACTION.EDITED | ACTION.CLEARED | ACTION.OPENED;
|
|
41
|
-
export type MediaEventPayload = MediaLinkAEP | MediaAltTextAction | MediaUIAction | MediaResizeTrackAction | MediaInputResizeTrackAction | MediaBorderTrackAction | CaptionTrackAction | ChangeMediaAEP;
|
|
45
|
+
export type MediaEventPayload = MediaLinkAEP | MediaAltTextAction | MediaUIAction | MediaResizeTrackAction | MediaInputResizeTrackAction | MediaBorderTrackAction | CaptionTrackAction | ChangeMediaAEP | MediaViewerEventAction;
|
|
42
46
|
export {};
|
|
@@ -4,8 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { ReactNode } from 'react';
|
|
6
6
|
import type { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
7
|
-
interface Props extends WithAnalyticsEventsProps {
|
|
7
|
+
export interface Props extends WithAnalyticsEventsProps {
|
|
8
8
|
isOpen?: boolean;
|
|
9
|
+
appearance?: string;
|
|
10
|
+
shouldFlip?: boolean;
|
|
11
|
+
isTriggerNotTabbable?: boolean;
|
|
9
12
|
trigger?: React.ReactNode;
|
|
10
13
|
position: string;
|
|
11
14
|
onOpenChange?: (event: OpenChangedEvent) => void;
|
|
@@ -14,10 +17,11 @@ interface Props extends WithAnalyticsEventsProps {
|
|
|
14
17
|
shouldFitContainer: boolean;
|
|
15
18
|
children?: ReactNode;
|
|
16
19
|
id?: string;
|
|
20
|
+
onDroplistRef?: (ref: HTMLDivElement | null) => unknown;
|
|
17
21
|
}
|
|
18
22
|
export type OpenChangedEvent = {
|
|
19
23
|
isOpen: boolean;
|
|
20
24
|
event: MouseEvent | KeyboardEvent;
|
|
21
25
|
};
|
|
22
|
-
declare const _default: import("react").ForwardRefExoticComponent<Pick<Omit<Props, keyof WithAnalyticsEventsProps> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "position" | "key" | "id" | "children" | "testId" | "analyticsContext" | "shouldFitContainer" | "onPositioned" | "isOpen" | "trigger" | "onOpenChange"> & import("react").RefAttributes<any>>;
|
|
26
|
+
declare const _default: import("react").ForwardRefExoticComponent<Pick<Omit<Props, keyof WithAnalyticsEventsProps> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "appearance" | "position" | "key" | "id" | "children" | "testId" | "analyticsContext" | "shouldFitContainer" | "onPositioned" | "isOpen" | "shouldFlip" | "isTriggerNotTabbable" | "trigger" | "onOpenChange" | "onDroplistRef"> & import("react").RefAttributes<any>>;
|
|
23
27
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { EmojiProvider, EmojiResourceConfig } from '@atlaskit/emoji/resource';
|
|
3
3
|
import type { EmojiId } from '@atlaskit/emoji/types';
|
|
4
4
|
import { type ProviderFactory } from '../../provider-factory';
|
|
@@ -10,5 +10,5 @@ export interface EmojiProps extends EmojiId {
|
|
|
10
10
|
resourceConfig?: EmojiResourceConfig;
|
|
11
11
|
emojiProvider?: EmojiProvider;
|
|
12
12
|
}
|
|
13
|
-
declare const
|
|
14
|
-
export default
|
|
13
|
+
declare const _default: React.MemoExoticComponent<(props: EmojiProps) => JSX.Element>;
|
|
14
|
+
export default _default;
|
|
@@ -39,7 +39,7 @@ export { panelTextInput } from './PanelTextInput/styles';
|
|
|
39
39
|
export { default as PanelTextInput } from './PanelTextInput';
|
|
40
40
|
export { default as Announcer } from './Announcer/announcer';
|
|
41
41
|
export { EDIT_AREA_ID } from './Toolbar';
|
|
42
|
-
export { default as DropList } from './DropList';
|
|
42
|
+
export { default as DropList, type Props as DropListProps } from './DropList';
|
|
43
43
|
export type { UseStickyToolbarType } from './Toolbar';
|
|
44
44
|
export type { OpenChangedEvent } from './DropList';
|
|
45
45
|
export { sharedMultiBodiedExtensionStyles } from './MultiBodiedExtension';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as ReactEditorViewContext } from './ReactEditorViewContext';
|
|
2
|
-
export { default as withReactEditorViewOuterListeners } from './with-react-editor-view-outer-listeners';
|
|
2
|
+
export { default as withReactEditorViewOuterListeners, OutsideClickTargetRefContext, } from './with-react-editor-view-outer-listeners';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
type SimpleEventHandler<T> = (event: T) => void;
|
|
3
|
+
export declare const OutsideClickTargetRefContext: React.Context<(el: HTMLElement | null) => void>;
|
|
3
4
|
export interface WithOutsideClickProps {
|
|
4
5
|
handleClickOutside?: SimpleEventHandler<MouseEvent>;
|
|
5
6
|
handleEscapeKeydown?: SimpleEventHandler<KeyboardEvent>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "94.
|
|
3
|
+
"version": "94.5.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/"
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
"@atlaskit/custom-steps": "^0.8.0",
|
|
122
122
|
"@atlaskit/dropdown-menu": "^12.21.0",
|
|
123
123
|
"@atlaskit/editor-json-transformer": "^8.20.0",
|
|
124
|
-
"@atlaskit/editor-palette": "1.6.
|
|
124
|
+
"@atlaskit/editor-palette": "1.6.3",
|
|
125
125
|
"@atlaskit/editor-prosemirror": "6.0.0",
|
|
126
126
|
"@atlaskit/editor-shared-styles": "^3.1.0",
|
|
127
127
|
"@atlaskit/editor-tables": "^2.8.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.10.0",
|
|
154
154
|
"@atlaskit/tokens": "^2.0.0",
|
|
155
155
|
"@atlaskit/tooltip": "^18.8.0",
|
|
156
156
|
"@atlaskit/width-detector": "^4.3.0",
|
|
@@ -276,9 +276,15 @@
|
|
|
276
276
|
"platform_editor_allow_annotation_triple_click": {
|
|
277
277
|
"type": "boolean"
|
|
278
278
|
},
|
|
279
|
+
"platform_editor_typography_ugc": {
|
|
280
|
+
"type": "boolean"
|
|
281
|
+
},
|
|
279
282
|
"platform_editor_heading_margin_fix": {
|
|
280
283
|
"type": "boolean"
|
|
281
284
|
},
|
|
285
|
+
"platform_editor_replace_finddomnode_in_common": {
|
|
286
|
+
"type": "boolean"
|
|
287
|
+
},
|
|
282
288
|
"platform_editor_element_dnd_nested_fix_patch_3": {
|
|
283
289
|
"type": "boolean"
|
|
284
290
|
}
|