@atlaskit/editor-core 210.1.5 → 210.1.7
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 +23 -0
- package/afm-cc/tsconfig.json +2 -2
- package/dist/cjs/ui/Appearance/Comment/Comment.js +1 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +16 -9
- package/dist/cjs/ui/ContentStyles/index.js +3 -3
- package/dist/cjs/ui/ContentStyles/status.js +2 -2
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +7 -9
- package/dist/cjs/ui/EditorContentContainer/styles/findReplaceStyles.js +1 -174
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/Appearance/Comment/Comment.js +1 -2
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +19 -12
- package/dist/es2019/ui/ContentStyles/index.js +5 -5
- package/dist/es2019/ui/ContentStyles/status.js +2 -2
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +8 -10
- package/dist/es2019/ui/EditorContentContainer/styles/findReplaceStyles.js +0 -225
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/Appearance/Comment/Comment.js +1 -2
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +16 -9
- package/dist/esm/ui/ContentStyles/index.js +4 -4
- package/dist/esm/ui/ContentStyles/status.js +2 -2
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +8 -10
- package/dist/esm/ui/EditorContentContainer/styles/findReplaceStyles.js +0 -173
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/CollapsedEditor/index.d.ts +1 -1
- package/dist/types/composable-editor/BaseThemeWrapper.d.ts +1 -1
- package/dist/types/composable-editor/editor-internal.d.ts +6 -6
- package/dist/types/composable-editor/hooks/useProviders.d.ts +4 -4
- package/dist/types/create-editor/ErrorBoundary.d.ts +4 -4
- package/dist/types/create-editor/ReactEditorView/useDispatchTransaction.d.ts +2 -2
- package/dist/types/create-editor/ReactEditorView.d.ts +16 -16
- package/dist/types/create-editor/create-schema.d.ts +1 -1
- package/dist/types/create-editor/create-universal-preset.d.ts +203 -194
- package/dist/types/create-editor/editorStateNotificationPlugin.d.ts +2 -2
- package/dist/types/create-editor/get-plugins.d.ts +13 -13
- package/dist/types/editor-appearances/FullPageEditor.d.ts +1 -1
- package/dist/types/presets/default.d.ts +21 -21
- package/dist/types/presets/universal.d.ts +214 -205
- package/dist/types/presets/useUniversalPreset.d.ts +202 -193
- package/dist/types/test-utils.d.ts +6 -6
- package/dist/types/types/editor-appearance-component.d.ts +23 -23
- package/dist/types/types/editor-config.d.ts +9 -9
- package/dist/types/types/editor-instance.d.ts +7 -7
- package/dist/types/types/editor-onchange.d.ts +1 -1
- package/dist/types/types/editor-props.d.ts +100 -100
- package/dist/types/types/i18n.d.ts +2 -2
- package/dist/types/ui/Addon/ClickAreaBlock/index.d.ts +1 -1
- package/dist/types/ui/Addon/Dropdown/index.d.ts +1 -1
- package/dist/types/ui/Addon/types.d.ts +1 -1
- package/dist/types/ui/Appearance/Chromeless.d.ts +6 -6
- package/dist/types/ui/Appearance/Comment/Toolbar.d.ts +2 -2
- package/dist/types/ui/Appearance/FullPage/CustomToolbarWrapper.d.ts +3 -3
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +11 -11
- package/dist/types/ui/Appearance/FullPage/FullPageToolbar.d.ts +12 -12
- package/dist/types/ui/Appearance/FullPage/FullPageToolbarNext.d.ts +1 -1
- package/dist/types/ui/Appearance/FullPage/MainToolbarWrapper.d.ts +2 -2
- package/dist/types/ui/Appearance/FullPage/types.d.ts +2 -2
- package/dist/types/ui/ChromeCollapsed/index.d.ts +2 -2
- package/dist/types/ui/CollapsedEditor/index.d.ts +2 -2
- package/dist/types/ui/ContentStyles/index.d.ts +4 -4
- package/dist/types/ui/ContextPanel/index.d.ts +4 -4
- package/dist/types/ui/EditorContentContainer/EditorContentContainer.d.ts +3 -3
- package/dist/types/ui/EditorContentContainer/styles/findReplaceStyles.d.ts +0 -1
- package/dist/types/ui/PluginSlot/index.d.ts +10 -10
- package/dist/types/ui/PluginSlot/mount-plugin-hooks.d.ts +1 -1
- package/dist/types/ui/Toolbar/Toolbar.d.ts +2 -2
- package/dist/types/ui/Toolbar/ToolbarPortal.d.ts +2 -2
- package/dist/types/ui/Toolbar/toolbar-types.d.ts +11 -11
- package/dist/types/ui/ToolbarHelp/index.d.ts +1 -1
- package/dist/types/utils/deprecation-warnings.d.ts +2 -2
- package/dist/types/utils/performance/components/RenderTracking.d.ts +1 -1
- package/dist/types/utils/performance/plugin-performance-report.d.ts +4 -4
- package/dist/types/utils/performance/simple-measure-to-entries.d.ts +1 -1
- package/dist/types/utils/performance/track-transactions.d.ts +1 -1
- package/dist/types-ts4.5/CollapsedEditor/index.d.ts +1 -1
- package/dist/types-ts4.5/composable-editor/BaseThemeWrapper.d.ts +1 -1
- package/dist/types-ts4.5/composable-editor/editor-internal.d.ts +7 -7
- package/dist/types-ts4.5/composable-editor/hooks/useProviders.d.ts +4 -4
- package/dist/types-ts4.5/create-editor/ErrorBoundary.d.ts +4 -4
- package/dist/types-ts4.5/create-editor/ReactEditorView/useDispatchTransaction.d.ts +2 -2
- package/dist/types-ts4.5/create-editor/ReactEditorView.d.ts +16 -16
- package/dist/types-ts4.5/create-editor/create-schema.d.ts +1 -1
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +239 -230
- package/dist/types-ts4.5/create-editor/editorStateNotificationPlugin.d.ts +2 -2
- package/dist/types-ts4.5/create-editor/get-plugins.d.ts +13 -13
- package/dist/types-ts4.5/editor-appearances/FullPageEditor.d.ts +1 -1
- package/dist/types-ts4.5/presets/default.d.ts +21 -21
- package/dist/types-ts4.5/presets/universal.d.ts +250 -241
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +238 -229
- package/dist/types-ts4.5/test-utils.d.ts +6 -6
- package/dist/types-ts4.5/types/editor-appearance-component.d.ts +23 -23
- package/dist/types-ts4.5/types/editor-config.d.ts +9 -9
- package/dist/types-ts4.5/types/editor-instance.d.ts +7 -7
- package/dist/types-ts4.5/types/editor-onchange.d.ts +1 -1
- package/dist/types-ts4.5/types/editor-props.d.ts +100 -100
- package/dist/types-ts4.5/types/i18n.d.ts +2 -2
- package/dist/types-ts4.5/ui/Addon/ClickAreaBlock/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/Addon/Dropdown/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/Addon/types.d.ts +1 -1
- package/dist/types-ts4.5/ui/Appearance/Chromeless.d.ts +6 -6
- package/dist/types-ts4.5/ui/Appearance/Comment/Toolbar.d.ts +2 -2
- package/dist/types-ts4.5/ui/Appearance/FullPage/CustomToolbarWrapper.d.ts +3 -3
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageContentArea.d.ts +13 -13
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbar.d.ts +12 -12
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbarNext.d.ts +1 -1
- package/dist/types-ts4.5/ui/Appearance/FullPage/MainToolbarWrapper.d.ts +2 -2
- package/dist/types-ts4.5/ui/Appearance/FullPage/types.d.ts +2 -2
- package/dist/types-ts4.5/ui/ChromeCollapsed/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/CollapsedEditor/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +4 -4
- package/dist/types-ts4.5/ui/ContextPanel/index.d.ts +4 -4
- package/dist/types-ts4.5/ui/EditorContentContainer/EditorContentContainer.d.ts +3 -3
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/findReplaceStyles.d.ts +0 -1
- package/dist/types-ts4.5/ui/PluginSlot/index.d.ts +10 -10
- package/dist/types-ts4.5/ui/PluginSlot/mount-plugin-hooks.d.ts +1 -1
- package/dist/types-ts4.5/ui/Toolbar/Toolbar.d.ts +2 -2
- package/dist/types-ts4.5/ui/Toolbar/ToolbarPortal.d.ts +2 -2
- package/dist/types-ts4.5/ui/Toolbar/toolbar-types.d.ts +11 -11
- package/dist/types-ts4.5/ui/ToolbarHelp/index.d.ts +1 -1
- package/dist/types-ts4.5/utils/deprecation-warnings.d.ts +2 -2
- package/dist/types-ts4.5/utils/performance/components/RenderTracking.d.ts +1 -1
- package/dist/types-ts4.5/utils/performance/plugin-performance-report.d.ts +4 -4
- package/dist/types-ts4.5/utils/performance/simple-measure-to-entries.d.ts +1 -1
- package/dist/types-ts4.5/utils/performance/track-transactions.d.ts +1 -1
- package/package.json +5 -18
- package/dist/cjs/ui/Appearance/FullPage/getEditorViewModeSync.js +0 -43
- package/dist/es2019/ui/Appearance/FullPage/getEditorViewModeSync.js +0 -33
- package/dist/esm/ui/Appearance/FullPage/getEditorViewModeSync.js +0 -36
- package/dist/types/ui/Appearance/FullPage/getEditorViewModeSync.d.ts +0 -3
- package/dist/types-ts4.5/ui/Appearance/FullPage/getEditorViewModeSync.d.ts +0 -3
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
interface MainToolbarWrapperProps {
|
|
7
|
-
showKeyline: boolean;
|
|
8
|
-
twoLineEditorToolbar: boolean;
|
|
9
7
|
children: React.ReactNode;
|
|
10
8
|
'data-testid'?: string;
|
|
9
|
+
showKeyline: boolean;
|
|
10
|
+
twoLineEditorToolbar: boolean;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Wrapper component for the main toolbar that handles feature flag based styling
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
7
7
|
export interface Props {
|
|
8
|
-
text?: string;
|
|
9
|
-
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
10
8
|
label?: string;
|
|
9
|
+
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
10
|
+
text?: string;
|
|
11
11
|
}
|
|
12
12
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
|
|
13
13
|
WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type Editor from '../../editor';
|
|
3
3
|
export interface Props {
|
|
4
|
-
placeholder?: string;
|
|
5
4
|
assistiveLabel?: string;
|
|
6
5
|
children?: any;
|
|
7
6
|
isExpanded?: boolean;
|
|
8
|
-
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
9
7
|
onExpand?: () => void;
|
|
8
|
+
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
9
|
+
placeholder?: string;
|
|
10
10
|
}
|
|
11
11
|
export type State = Object;
|
|
12
12
|
export default class CollapsedEditor extends React.Component<Props, State> {
|
|
@@ -8,13 +8,13 @@ import { type Theme } from '@emotion/react';
|
|
|
8
8
|
import type { EditorAppearance, FeatureFlags } from '@atlaskit/editor-common/types';
|
|
9
9
|
export declare const linkStyles: SerializedStyles;
|
|
10
10
|
type ContentStylesProps = {
|
|
11
|
-
|
|
11
|
+
appearance?: EditorAppearance;
|
|
12
12
|
colorMode?: 'light' | 'dark';
|
|
13
13
|
featureFlags?: FeatureFlags;
|
|
14
|
-
viewMode?: 'view' | 'edit';
|
|
15
|
-
typographyTheme?: 'typography' | 'typography-adg3' | 'typography-modernized' | 'typography-refreshed';
|
|
16
14
|
isScrollable?: boolean;
|
|
17
|
-
|
|
15
|
+
theme?: Theme;
|
|
16
|
+
typographyTheme?: 'typography' | 'typography-adg3' | 'typography-modernized' | 'typography-refreshed';
|
|
17
|
+
viewMode?: 'view' | 'edit';
|
|
18
18
|
};
|
|
19
19
|
export declare const placeholderStyles: SerializedStyles;
|
|
20
20
|
type Props = ContentStylesProps & React.HTMLProps<HTMLDivElement>;
|
|
@@ -9,20 +9,20 @@ import type { OptionalPlugin, PublicPluginAPI } from '@atlaskit/editor-common/ty
|
|
|
9
9
|
import { type ContextPanelPlugin } from '@atlaskit/editor-plugins/context-panel';
|
|
10
10
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
11
11
|
export type Props = {
|
|
12
|
-
|
|
12
|
+
children?: React.ReactElement;
|
|
13
|
+
customWidth?: number;
|
|
13
14
|
editorAPI: PublicPluginAPI<[
|
|
14
15
|
OptionalPlugin<ContextPanelPlugin>
|
|
15
16
|
]> | undefined;
|
|
16
|
-
children?: React.ReactElement;
|
|
17
17
|
hasPadding?: boolean;
|
|
18
|
-
|
|
18
|
+
visible: boolean;
|
|
19
19
|
};
|
|
20
20
|
export declare const panel: import("@emotion/react").SerializedStyles;
|
|
21
21
|
export declare const content: import("@emotion/react").SerializedStyles;
|
|
22
22
|
type SwappableContentAreaProps = {
|
|
23
|
-
pluginContent?: React.ReactNode;
|
|
24
23
|
editorView?: EditorView;
|
|
25
24
|
intl: IntlShape;
|
|
25
|
+
pluginContent?: React.ReactNode;
|
|
26
26
|
} & Props;
|
|
27
27
|
export declare const SwappableContentArea: React.FC<import("react-intl-next").WithIntlProps<SwappableContentAreaProps>> & {
|
|
28
28
|
WrappedComponent: React.ComponentType<SwappableContentAreaProps>;
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import type { EditorAppearance, FeatureFlags } from '@atlaskit/editor-common/types';
|
|
7
7
|
export type EditorContentContainerProps = {
|
|
8
|
-
|
|
8
|
+
appearance?: EditorAppearance;
|
|
9
9
|
children?: React.ReactNode;
|
|
10
|
+
className?: string;
|
|
10
11
|
featureFlags?: FeatureFlags;
|
|
11
|
-
viewMode?: 'view' | 'edit';
|
|
12
12
|
isScrollable?: boolean;
|
|
13
|
-
|
|
13
|
+
viewMode?: 'view' | 'edit';
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
16
|
* EditorContentStyles is a wrapper component that applies styles to its children
|
|
@@ -11,20 +11,20 @@ import type { EditorAppearance, ReactHookFactory, UIComponentFactory } from '@at
|
|
|
11
11
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
12
12
|
import type EditorActions from '../../actions';
|
|
13
13
|
export interface Props {
|
|
14
|
-
items?: UIComponentFactory[];
|
|
15
|
-
pluginHooks?: ReactHookFactory[];
|
|
16
|
-
editorView?: EditorView;
|
|
17
|
-
editorActions?: EditorActions;
|
|
18
|
-
eventDispatcher?: EventDispatcher;
|
|
19
|
-
providerFactory: ProviderFactory;
|
|
20
14
|
appearance?: EditorAppearance;
|
|
21
|
-
popupsMountPoint?: HTMLElement;
|
|
22
|
-
popupsBoundariesElement?: HTMLElement;
|
|
23
|
-
popupsScrollableElement?: HTMLElement;
|
|
24
15
|
containerElement: HTMLElement | null;
|
|
16
|
+
contentArea?: HTMLElement;
|
|
25
17
|
disabled: boolean;
|
|
26
18
|
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
27
|
-
|
|
19
|
+
editorActions?: EditorActions;
|
|
20
|
+
editorView?: EditorView;
|
|
21
|
+
eventDispatcher?: EventDispatcher;
|
|
22
|
+
items?: UIComponentFactory[];
|
|
23
|
+
pluginHooks?: ReactHookFactory[];
|
|
24
|
+
popupsBoundariesElement?: HTMLElement;
|
|
25
|
+
popupsMountPoint?: HTMLElement;
|
|
26
|
+
popupsScrollableElement?: HTMLElement;
|
|
27
|
+
providerFactory: ProviderFactory;
|
|
28
28
|
wrapperElement: HTMLElement | null;
|
|
29
29
|
}
|
|
30
30
|
declare const PluginSlotComponent: React.MemoExoticComponent<({ items, editorView, editorActions, eventDispatcher, providerFactory, appearance, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, containerElement, disabled, dispatchAnalyticsEvent, wrapperElement, pluginHooks, }: Props) => jsx.JSX.Element | null>;
|
|
@@ -2,9 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import type { ReactHookFactory } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
interface MountPluginHooksProps {
|
|
5
|
+
containerElement: HTMLElement | null;
|
|
5
6
|
editorView: EditorView | undefined;
|
|
6
7
|
pluginHooks: ReactHookFactory[] | undefined;
|
|
7
|
-
containerElement: HTMLElement | null;
|
|
8
8
|
}
|
|
9
9
|
export declare function MountPluginHooks({ pluginHooks, editorView, containerElement, }: MountPluginHooksProps): React.JSX.Element | null;
|
|
10
10
|
export {};
|
|
@@ -13,12 +13,12 @@ import type { ToolbarProps } from './toolbar-types';
|
|
|
13
13
|
*/
|
|
14
14
|
export declare const Toolbar: (props: ToolbarProps) => JSX.Element;
|
|
15
15
|
type NewToolbarProps = Pick<ToolbarUIContextType, 'popupsMountPoint'> & Pick<EditorToolbarContextType, 'editorAppearance'> & {
|
|
16
|
-
toolbar: RegisterToolbar;
|
|
17
16
|
components: RegisterComponent[];
|
|
18
|
-
editorView?: EditorView;
|
|
19
17
|
editorAPI?: PublicPluginAPI<[
|
|
20
18
|
ToolbarPlugin
|
|
21
19
|
]>;
|
|
20
|
+
editorView?: EditorView;
|
|
21
|
+
toolbar: RegisterToolbar;
|
|
22
22
|
};
|
|
23
23
|
/**
|
|
24
24
|
* Renders a primary toolbar, driven by components registed by `editor-plugin-toolbar`. `ToolbarModelRenderer` will just
|
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
type ToolbarPortalContextValue = {
|
|
7
|
+
isActive: boolean;
|
|
7
8
|
Portal: React.ComponentType<{
|
|
8
9
|
children: React.ReactNode;
|
|
9
10
|
}>;
|
|
10
|
-
isActive: boolean;
|
|
11
11
|
};
|
|
12
12
|
export declare const ToolbarPortalContextProvider: ({ children, portal, isActive, }: {
|
|
13
13
|
children: React.ReactNode;
|
|
14
|
+
isActive: boolean;
|
|
14
15
|
portal: React.ComponentType<{
|
|
15
16
|
children: React.ReactNode;
|
|
16
17
|
}>;
|
|
17
|
-
isActive: boolean;
|
|
18
18
|
}) => JSX.Element;
|
|
19
19
|
export declare const useToolbarPortal: () => ToolbarPortalContextValue | undefined;
|
|
20
20
|
export declare const ToolbarPortalMountPoint: () => JSX.Element | null;
|
|
@@ -5,29 +5,29 @@ import type { EditorAppearance, ToolbarSize, ToolbarUIComponentFactory } from '@
|
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import type EditorActions from '../../actions';
|
|
7
7
|
export interface ToolbarBreakPoint {
|
|
8
|
-
width: number;
|
|
9
8
|
size: ToolbarSize;
|
|
9
|
+
width: number;
|
|
10
10
|
}
|
|
11
11
|
export interface ToolbarProps {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
appearance?: EditorAppearance;
|
|
13
|
+
containerElement: HTMLElement | null;
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
14
16
|
editorActions?: EditorActions;
|
|
17
|
+
editorView: EditorView;
|
|
15
18
|
eventDispatcher: EventDispatcher;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
popupsMountPoint?: HTMLElement;
|
|
19
|
+
hasMinWidth?: boolean;
|
|
20
|
+
items?: Array<ToolbarUIComponentFactory>;
|
|
19
21
|
popupsBoundariesElement?: HTMLElement;
|
|
22
|
+
popupsMountPoint?: HTMLElement;
|
|
20
23
|
popupsScrollableElement?: HTMLElement;
|
|
21
|
-
|
|
22
|
-
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
24
|
+
providerFactory: ProviderFactory;
|
|
23
25
|
toolbarSize: ToolbarSize;
|
|
24
|
-
containerElement: HTMLElement | null;
|
|
25
|
-
hasMinWidth?: boolean;
|
|
26
26
|
twoLineEditorToolbar?: boolean;
|
|
27
27
|
}
|
|
28
28
|
export type ToolbarWithSizeDetectorProps = Omit<ToolbarProps, 'toolbarSize'>;
|
|
29
29
|
export interface ToolbarInnerProps extends ToolbarProps {
|
|
30
|
-
isToolbarReducedSpacing: boolean;
|
|
31
30
|
isReducedSpacing?: boolean;
|
|
31
|
+
isToolbarReducedSpacing: boolean;
|
|
32
32
|
}
|
|
33
33
|
export declare const toolbarTestIdPrefix = "ak-editor-toolbar-button";
|
|
@@ -4,9 +4,9 @@ import { type ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
|
4
4
|
import { type HelpDialogPlugin } from '@atlaskit/editor-plugins/help-dialog';
|
|
5
5
|
import type { PositionType } from '@atlaskit/tooltip/types';
|
|
6
6
|
interface Props {
|
|
7
|
+
editorApi?: ExtractInjectionAPI<HelpDialogPlugin> | undefined;
|
|
7
8
|
title?: string;
|
|
8
9
|
titlePosition?: PositionType;
|
|
9
|
-
editorApi?: ExtractInjectionAPI<HelpDialogPlugin> | undefined;
|
|
10
10
|
}
|
|
11
11
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
|
|
12
12
|
WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export interface DeprecationWarning<Props> {
|
|
2
|
-
|
|
2
|
+
condition?: (props: Props) => boolean;
|
|
3
3
|
description?: string;
|
|
4
|
+
property: string;
|
|
4
5
|
type?: string;
|
|
5
|
-
condition?: (props: Props) => boolean;
|
|
6
6
|
}
|
|
7
7
|
declare function deprecationWarnings<Props extends object>(className: string, props: Props, deprecations: Array<DeprecationWarning<Props>>): void;
|
|
8
8
|
export default deprecationWarnings;
|
|
@@ -2,9 +2,9 @@ import type { ACTION, ACTION_SUBJECT, FireAnalyticsCallback } from '@atlaskit/ed
|
|
|
2
2
|
type RenderActions = ACTION.RE_RENDERED;
|
|
3
3
|
type RenderActionSubjects = ACTION_SUBJECT.EDITOR | ACTION_SUBJECT.REACT_EDITOR_VIEW;
|
|
4
4
|
export type RenderTrackingProps<ComponentProps> = {
|
|
5
|
-
componentProps: ComponentProps;
|
|
6
5
|
action: RenderActions;
|
|
7
6
|
actionSubject: RenderActionSubjects;
|
|
7
|
+
componentProps: ComponentProps;
|
|
8
8
|
handleAnalyticsEvent: FireAnalyticsCallback;
|
|
9
9
|
propsToIgnore?: Array<keyof ComponentProps>;
|
|
10
10
|
useShallow?: boolean;
|
|
@@ -4,15 +4,15 @@ export interface OutlierReport {
|
|
|
4
4
|
viewUpdateOutlier: number | undefined;
|
|
5
5
|
}
|
|
6
6
|
export interface PluginPerformanceReportOptions {
|
|
7
|
-
|
|
7
|
+
outlierFactor: number;
|
|
8
|
+
outlierThreshold: number;
|
|
8
9
|
samplingRate: number;
|
|
9
10
|
slowThreshold: number;
|
|
10
|
-
|
|
11
|
-
outlierFactor: number;
|
|
11
|
+
usePerformanceMarks?: boolean;
|
|
12
12
|
}
|
|
13
13
|
export type NodesCount = {
|
|
14
|
-
nodeCount: NodeCount;
|
|
15
14
|
extensionNodeCount: NodeCount;
|
|
15
|
+
nodeCount: NodeCount;
|
|
16
16
|
};
|
|
17
17
|
export declare class PluginPerformanceReport {
|
|
18
18
|
private entry;
|
|
@@ -10,8 +10,8 @@ interface MeasureHelpers {
|
|
|
10
10
|
stopMeasure: (measureName: string, onMeasureComplete?: (duration: number, startTime: number) => void) => void;
|
|
11
11
|
}
|
|
12
12
|
interface SimpleEntry {
|
|
13
|
-
name: string;
|
|
14
13
|
duration: number;
|
|
14
|
+
name: string;
|
|
15
15
|
startTime: number;
|
|
16
16
|
}
|
|
17
17
|
type MeasureListener = (entry: SimpleEntry) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "210.1.
|
|
3
|
+
"version": "210.1.7",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@atlaskit/platform-feature-flags-react": "^0.2.0",
|
|
64
64
|
"@atlaskit/react-ufo": "^4.4.0",
|
|
65
65
|
"@atlaskit/task-decision": "^19.2.0",
|
|
66
|
-
"@atlaskit/tmp-editor-statsig": "^11.
|
|
66
|
+
"@atlaskit/tmp-editor-statsig": "^11.6.0",
|
|
67
67
|
"@atlaskit/tokens": "^6.0.0",
|
|
68
68
|
"@atlaskit/tooltip": "^20.4.0",
|
|
69
69
|
"@atlaskit/width-detector": "^5.0.0",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"uuid": "^3.1.0"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
|
-
"@atlaskit/editor-common": "^107.
|
|
83
|
+
"@atlaskit/editor-common": "^107.29.0",
|
|
84
84
|
"@atlaskit/link-provider": "^3.7.0",
|
|
85
85
|
"@atlaskit/media-core": "^37.0.0",
|
|
86
86
|
"react": "^18.2.0",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"@atlaskit/analytics-listeners": "^9.0.0",
|
|
95
95
|
"@atlaskit/collab-provider": "^11.3.0",
|
|
96
96
|
"@atlaskit/editor-plugin-annotation": "^3.3.0",
|
|
97
|
-
"@atlaskit/editor-plugin-card": "^7.
|
|
97
|
+
"@atlaskit/editor-plugin-card": "^7.5.0",
|
|
98
98
|
"@atlaskit/editor-plugin-list": "^5.1.0",
|
|
99
99
|
"@atlaskit/editor-plugin-paste": "^4.1.0",
|
|
100
100
|
"@atlaskit/link-provider": "^3.7.0",
|
|
@@ -106,11 +106,10 @@
|
|
|
106
106
|
"@atlaskit/primitives": "^14.11.0",
|
|
107
107
|
"@atlaskit/renderer": "^120.5.0",
|
|
108
108
|
"@atlaskit/section-message": "^8.5.0",
|
|
109
|
-
"@atlaskit/smart-card": "^40.
|
|
109
|
+
"@atlaskit/smart-card": "^40.13.0",
|
|
110
110
|
"@atlaskit/synchrony-test-helpers": "workspace:^",
|
|
111
111
|
"@atlaskit/toggle": "^15.1.0",
|
|
112
112
|
"@atlaskit/util-data-test": "^18.1.0",
|
|
113
|
-
"@atlaskit/visual-regression": "workspace:^",
|
|
114
113
|
"@atlassian/adf-schema-json": "^1.31.0",
|
|
115
114
|
"@atlassian/feature-flags-test-utils": "^0.3.0",
|
|
116
115
|
"@atlassian/search-provider": "^4.0.0",
|
|
@@ -162,12 +161,6 @@
|
|
|
162
161
|
"platform_editor_reduce_scroll_jump_on_editor_start": {
|
|
163
162
|
"type": "boolean"
|
|
164
163
|
},
|
|
165
|
-
"platform_editor_sync_editor_view_mode_state": {
|
|
166
|
-
"type": "boolean"
|
|
167
|
-
},
|
|
168
|
-
"platform_editor_sync_editor_view_mode_state_revert": {
|
|
169
|
-
"type": "boolean"
|
|
170
|
-
},
|
|
171
164
|
"annotations_defensive_node_name_calculations": {
|
|
172
165
|
"type": "boolean",
|
|
173
166
|
"referenceOnly": "true"
|
|
@@ -504,9 +497,6 @@
|
|
|
504
497
|
"platform_editor_fix_code_block_bg_color_in_macro_2": {
|
|
505
498
|
"type": "boolean"
|
|
506
499
|
},
|
|
507
|
-
"platform_editor_editor_container_a11y_focus": {
|
|
508
|
-
"type": "boolean"
|
|
509
|
-
},
|
|
510
500
|
"platform_editor_vanilla_codebidi_warning": {
|
|
511
501
|
"type": "boolean"
|
|
512
502
|
},
|
|
@@ -520,9 +510,6 @@
|
|
|
520
510
|
"type": "boolean",
|
|
521
511
|
"referenceOnly": true
|
|
522
512
|
},
|
|
523
|
-
"platform_editor_find_and_replace_improvements_1": {
|
|
524
|
-
"type": "boolean"
|
|
525
|
-
},
|
|
526
513
|
"platform_editor_task_check_status_fix": {
|
|
527
514
|
"type": "boolean",
|
|
528
515
|
"referenceOnly": true
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.getEditorViewMode = void 0;
|
|
8
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
|
-
// Retrieve the initial config value from the editor view plugin preset
|
|
11
|
-
var getViewModeSync = function getViewModeSync(preset) {
|
|
12
|
-
var _editorViewModePlugin;
|
|
13
|
-
if (!(0, _platformFeatureFlags.fg)('platform_editor_sync_editor_view_mode_state') || (0, _platformFeatureFlags.fg)('platform_editor_sync_editor_view_mode_state_revert')) {
|
|
14
|
-
return undefined;
|
|
15
|
-
}
|
|
16
|
-
// @ts-expect-error - data is a private property
|
|
17
|
-
var editorViewModePlugin = preset.data.find(function (p) {
|
|
18
|
-
if (Array.isArray(p)) {
|
|
19
|
-
var _p = (0, _slicedToArray2.default)(p, 2),
|
|
20
|
-
plugin = _p[0],
|
|
21
|
-
config = _p[1];
|
|
22
|
-
return plugin({
|
|
23
|
-
config: config
|
|
24
|
-
}).name === 'editorViewMode';
|
|
25
|
-
} else {
|
|
26
|
-
var _p2;
|
|
27
|
-
return (p === null || p === void 0 || (_p2 = p({
|
|
28
|
-
config: undefined
|
|
29
|
-
})) === null || _p2 === void 0 ? void 0 : _p2.name) === 'editorViewMode';
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
// If we have set a default value on the view mode (index 1) then we can return the mode, otherwise we haven't set by default
|
|
33
|
-
return Array.isArray(editorViewModePlugin) ? (_editorViewModePlugin = editorViewModePlugin[1]) === null || _editorViewModePlugin === void 0 ? void 0 : _editorViewModePlugin.mode : undefined;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
// Temporary to ensure view mode is always set synchronously
|
|
37
|
-
// TODO: ED-27194 - Make editorAPI be set synchronously and we can remove this code
|
|
38
|
-
var getEditorViewMode = exports.getEditorViewMode = function getEditorViewMode(editorViewModeState, preset) {
|
|
39
|
-
if (!(editorViewModeState !== null && editorViewModeState !== void 0 && editorViewModeState.mode)) {
|
|
40
|
-
return getViewModeSync(preset);
|
|
41
|
-
}
|
|
42
|
-
return editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode;
|
|
43
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
|
-
// Retrieve the initial config value from the editor view plugin preset
|
|
3
|
-
const getViewModeSync = preset => {
|
|
4
|
-
var _editorViewModePlugin;
|
|
5
|
-
if (!fg('platform_editor_sync_editor_view_mode_state') || fg('platform_editor_sync_editor_view_mode_state_revert')) {
|
|
6
|
-
return undefined;
|
|
7
|
-
}
|
|
8
|
-
// @ts-expect-error - data is a private property
|
|
9
|
-
const editorViewModePlugin = preset.data.find(p => {
|
|
10
|
-
if (Array.isArray(p)) {
|
|
11
|
-
const [plugin, config] = p;
|
|
12
|
-
return plugin({
|
|
13
|
-
config
|
|
14
|
-
}).name === 'editorViewMode';
|
|
15
|
-
} else {
|
|
16
|
-
var _p;
|
|
17
|
-
return (p === null || p === void 0 ? void 0 : (_p = p({
|
|
18
|
-
config: undefined
|
|
19
|
-
})) === null || _p === void 0 ? void 0 : _p.name) === 'editorViewMode';
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
// If we have set a default value on the view mode (index 1) then we can return the mode, otherwise we haven't set by default
|
|
23
|
-
return Array.isArray(editorViewModePlugin) ? (_editorViewModePlugin = editorViewModePlugin[1]) === null || _editorViewModePlugin === void 0 ? void 0 : _editorViewModePlugin.mode : undefined;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
// Temporary to ensure view mode is always set synchronously
|
|
27
|
-
// TODO: ED-27194 - Make editorAPI be set synchronously and we can remove this code
|
|
28
|
-
export const getEditorViewMode = (editorViewModeState, preset) => {
|
|
29
|
-
if (!(editorViewModeState !== null && editorViewModeState !== void 0 && editorViewModeState.mode)) {
|
|
30
|
-
return getViewModeSync(preset);
|
|
31
|
-
}
|
|
32
|
-
return editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode;
|
|
33
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
-
// Retrieve the initial config value from the editor view plugin preset
|
|
4
|
-
var getViewModeSync = function getViewModeSync(preset) {
|
|
5
|
-
var _editorViewModePlugin;
|
|
6
|
-
if (!fg('platform_editor_sync_editor_view_mode_state') || fg('platform_editor_sync_editor_view_mode_state_revert')) {
|
|
7
|
-
return undefined;
|
|
8
|
-
}
|
|
9
|
-
// @ts-expect-error - data is a private property
|
|
10
|
-
var editorViewModePlugin = preset.data.find(function (p) {
|
|
11
|
-
if (Array.isArray(p)) {
|
|
12
|
-
var _p = _slicedToArray(p, 2),
|
|
13
|
-
plugin = _p[0],
|
|
14
|
-
config = _p[1];
|
|
15
|
-
return plugin({
|
|
16
|
-
config: config
|
|
17
|
-
}).name === 'editorViewMode';
|
|
18
|
-
} else {
|
|
19
|
-
var _p2;
|
|
20
|
-
return (p === null || p === void 0 || (_p2 = p({
|
|
21
|
-
config: undefined
|
|
22
|
-
})) === null || _p2 === void 0 ? void 0 : _p2.name) === 'editorViewMode';
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
// If we have set a default value on the view mode (index 1) then we can return the mode, otherwise we haven't set by default
|
|
26
|
-
return Array.isArray(editorViewModePlugin) ? (_editorViewModePlugin = editorViewModePlugin[1]) === null || _editorViewModePlugin === void 0 ? void 0 : _editorViewModePlugin.mode : undefined;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
// Temporary to ensure view mode is always set synchronously
|
|
30
|
-
// TODO: ED-27194 - Make editorAPI be set synchronously and we can remove this code
|
|
31
|
-
export var getEditorViewMode = function getEditorViewMode(editorViewModeState, preset) {
|
|
32
|
-
if (!(editorViewModeState !== null && editorViewModeState !== void 0 && editorViewModeState.mode)) {
|
|
33
|
-
return getViewModeSync(preset);
|
|
34
|
-
}
|
|
35
|
-
return editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode;
|
|
36
|
-
};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { ViewMode, EditorViewModePluginState } from '@atlaskit/editor-plugins/editor-viewmode';
|
|
2
|
-
import type { ComponentProps } from './FullPage';
|
|
3
|
-
export declare const getEditorViewMode: (editorViewModeState: Pick<EditorViewModePluginState, "mode"> | undefined | null, preset: ComponentProps["preset"]) => ViewMode;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { ViewMode, EditorViewModePluginState } from '@atlaskit/editor-plugins/editor-viewmode';
|
|
2
|
-
import type { ComponentProps } from './FullPage';
|
|
3
|
-
export declare const getEditorViewMode: (editorViewModeState: Pick<EditorViewModePluginState, "mode"> | undefined | null, preset: ComponentProps["preset"]) => ViewMode;
|