@atlaskit/editor-common 70.3.0 → 71.0.1
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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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/types/enums.d.ts +1 -0
- package/dist/types/analytics/types/general-events.d.ts +2 -1
- 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
|
@@ -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.1",
|
|
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": "^
|
|
80
|
-
"@atlaskit/smart-card": "^23.
|
|
80
|
+
"@atlaskit/profilecard": "^18.0.0",
|
|
81
|
+
"@atlaskit/smart-card": "^23.9.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-->
|