@atlaskit/editor-core 210.1.6 → 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 +15 -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 +1 -5
- 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 +1 -5
- 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 +1 -5
- 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 -195
- 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 -206
- package/dist/types/presets/useUniversalPreset.d.ts +202 -194
- 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 -231
- 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 -242
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +238 -230
- 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 -17
- 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,18 +9,18 @@ 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
|
-
visible: boolean;
|
|
13
|
-
editorAPI: PublicPluginAPI<[OptionalPlugin<ContextPanelPlugin>]> | undefined;
|
|
14
12
|
children?: React.ReactElement;
|
|
15
|
-
hasPadding?: boolean;
|
|
16
13
|
customWidth?: number;
|
|
14
|
+
editorAPI: PublicPluginAPI<[OptionalPlugin<ContextPanelPlugin>]> | undefined;
|
|
15
|
+
hasPadding?: boolean;
|
|
16
|
+
visible: boolean;
|
|
17
17
|
};
|
|
18
18
|
export declare const panel: import("@emotion/react").SerializedStyles;
|
|
19
19
|
export declare const content: import("@emotion/react").SerializedStyles;
|
|
20
20
|
type SwappableContentAreaProps = {
|
|
21
|
-
pluginContent?: React.ReactNode;
|
|
22
21
|
editorView?: EditorView;
|
|
23
22
|
intl: IntlShape;
|
|
23
|
+
pluginContent?: React.ReactNode;
|
|
24
24
|
} & Props;
|
|
25
25
|
export declare const SwappableContentArea: React.FC<import("react-intl-next").WithIntlProps<SwappableContentAreaProps>> & {
|
|
26
26
|
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,10 +13,10 @@ 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<[ToolbarPlugin]>;
|
|
18
|
+
editorView?: EditorView;
|
|
19
|
+
toolbar: RegisterToolbar;
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
22
22
|
* 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;
|
|
@@ -8,9 +8,9 @@ export type EditorModule = {
|
|
|
8
8
|
WithEditorActions: typeof EditorImports.WithEditorActions;
|
|
9
9
|
} & EditorModules;
|
|
10
10
|
export interface Props {
|
|
11
|
-
placeholder?: string;
|
|
12
11
|
isExpanded?: boolean;
|
|
13
12
|
onClickToExpand?: () => void;
|
|
13
|
+
placeholder?: string;
|
|
14
14
|
renderEditor: (Editor: typeof EditorImports.Editor, modules: EditorModule) => JSX.Element;
|
|
15
15
|
}
|
|
16
16
|
export interface State {
|
|
@@ -10,24 +10,24 @@ import type EditorActions from '../actions';
|
|
|
10
10
|
import { type EditorAppearanceComponentProps } from '../types';
|
|
11
11
|
import type { EditorNextProps } from '../types/editor-props';
|
|
12
12
|
interface InternalProps {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
AppearanceComponent: React.ComponentType<React.PropsWithChildren<EditorAppearanceComponentProps<[
|
|
14
|
+
]>>>;
|
|
15
15
|
createAnalyticsEvent: CreateUIAnalyticsEvent;
|
|
16
|
-
handleSave: (view: EditorView) => void;
|
|
17
16
|
editorActions: EditorActions;
|
|
17
|
+
handleAnalyticsEvent: FireAnalyticsCallback;
|
|
18
|
+
handleSave: (view: EditorView) => void;
|
|
18
19
|
onEditorCreated: (instance: {
|
|
19
|
-
view: EditorView;
|
|
20
20
|
eventDispatcher: EventDispatcher;
|
|
21
21
|
transformer?: Transformer<string>;
|
|
22
|
+
view: EditorView;
|
|
22
23
|
}) => void;
|
|
23
24
|
onEditorDestroyed: (_instance: {
|
|
24
|
-
view: EditorView;
|
|
25
25
|
transformer?: Transformer<string>;
|
|
26
|
+
view: EditorView;
|
|
26
27
|
}) => void;
|
|
27
28
|
preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>;
|
|
29
|
+
props: EditorNextProps;
|
|
28
30
|
providerFactory: ProviderFactory;
|
|
29
|
-
AppearanceComponent: React.ComponentType<React.PropsWithChildren<EditorAppearanceComponentProps<[
|
|
30
|
-
]>>>;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
* EditorInternalComponent is used to capture the common component
|
|
@@ -11,6 +11,9 @@ import type { EmojiProvider } from '@atlaskit/emoji';
|
|
|
11
11
|
import type { MentionProvider } from '@atlaskit/mention/resource';
|
|
12
12
|
import type { TaskDecisionProvider } from '@atlaskit/task-decision/types';
|
|
13
13
|
interface UseProvidersProps {
|
|
14
|
+
autoformattingProvider: Promise<AutoformattingProvider> | undefined;
|
|
15
|
+
cardProvider: Promise<CardProvider> | undefined;
|
|
16
|
+
contextIdentifierProvider: Promise<ContextIdentifierProvider> | undefined;
|
|
14
17
|
editorApi: PublicPluginAPI<[
|
|
15
18
|
OptionalPlugin<ContextIdentifierPlugin>,
|
|
16
19
|
OptionalPlugin<MediaPlugin>,
|
|
@@ -20,12 +23,9 @@ interface UseProvidersProps {
|
|
|
20
23
|
OptionalPlugin<CustomAutoformatPlugin>,
|
|
21
24
|
OptionalPlugin<TasksAndDecisionsPlugin>
|
|
22
25
|
]> | undefined;
|
|
23
|
-
|
|
26
|
+
emojiProvider: Promise<EmojiProvider> | undefined;
|
|
24
27
|
mediaProvider: Promise<MediaProvider> | undefined;
|
|
25
28
|
mentionProvider: Promise<MentionProvider> | undefined;
|
|
26
|
-
cardProvider: Promise<CardProvider> | undefined;
|
|
27
|
-
emojiProvider: Promise<EmojiProvider> | undefined;
|
|
28
|
-
autoformattingProvider: Promise<AutoformattingProvider> | undefined;
|
|
29
29
|
taskDecisionProvider: Promise<TaskDecisionProvider> | undefined;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
@@ -5,13 +5,13 @@ import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
|
5
5
|
import type { UserBrowserExtensionResults } from '@atlaskit/editor-common/utils';
|
|
6
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
export type ErrorBoundaryProps = {
|
|
8
|
-
|
|
8
|
+
children: React.ReactNode;
|
|
9
9
|
contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
|
|
10
|
+
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
10
11
|
editorView?: EditorView;
|
|
11
|
-
rethrow?: boolean;
|
|
12
|
-
children: React.ReactNode;
|
|
13
|
-
featureFlags: FeatureFlags;
|
|
14
12
|
errorTracking?: boolean;
|
|
13
|
+
featureFlags: FeatureFlags;
|
|
14
|
+
rethrow?: boolean;
|
|
15
15
|
};
|
|
16
16
|
export type ErrorBoundaryState = {
|
|
17
17
|
error?: Error;
|
|
@@ -5,9 +5,9 @@ import type { EditorViewStateUpdatedCallbackProps } from '../../types/editor-con
|
|
|
5
5
|
import type { EditorOnChangeHandler } from '../../types/editor-onchange';
|
|
6
6
|
type DispatchTransaction = (view: EditorView | undefined, tr: Transaction) => void;
|
|
7
7
|
export declare const useDispatchTransaction: ({ onChange, dispatchAnalyticsEvent, onEditorViewUpdated, isRemoteReplaceDocumentTransaction, }: {
|
|
8
|
-
onChange: EditorOnChangeHandler | undefined;
|
|
9
8
|
dispatchAnalyticsEvent: (payload: AnalyticsEventPayload) => void;
|
|
10
|
-
onEditorViewUpdated: (params: EditorViewStateUpdatedCallbackProps) => void;
|
|
11
9
|
isRemoteReplaceDocumentTransaction?: (tr: Transaction) => boolean;
|
|
10
|
+
onChange: EditorOnChangeHandler | undefined;
|
|
11
|
+
onEditorViewUpdated: (params: EditorViewStateUpdatedCallbackProps) => void;
|
|
12
12
|
}) => DispatchTransaction;
|
|
13
13
|
export {};
|
|
@@ -11,37 +11,37 @@ import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
11
11
|
import type { EditorConfig, EditorProps } from '../types';
|
|
12
12
|
import type { EditorNextProps } from '../types/editor-props';
|
|
13
13
|
export interface EditorViewProps extends WrappedComponentProps {
|
|
14
|
+
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
15
|
+
disabled?: boolean;
|
|
14
16
|
editorProps: (EditorProps | EditorNextProps) & {
|
|
15
17
|
preset?: EditorNextProps['preset'];
|
|
16
18
|
};
|
|
17
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
18
|
-
providerFactory: ProviderFactory;
|
|
19
|
-
portalProviderAPI: PortalProviderAPI;
|
|
20
19
|
nodeViewPortalProviderAPI: PortalProviderAPI;
|
|
21
|
-
disabled?: boolean;
|
|
22
|
-
render?: (props: {
|
|
23
|
-
editor: JSX.Element;
|
|
24
|
-
view?: EditorView;
|
|
25
|
-
config: EditorConfig;
|
|
26
|
-
eventDispatcher: EventDispatcher;
|
|
27
|
-
transformer?: Transformer<string>;
|
|
28
|
-
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
29
|
-
editorRef: React.RefObject<HTMLDivElement>;
|
|
30
|
-
editorAPI: PublicPluginAPI<any> | undefined;
|
|
31
|
-
}) => JSX.Element;
|
|
32
20
|
onEditorCreated: (instance: {
|
|
33
|
-
view: EditorView;
|
|
34
21
|
config: EditorConfig;
|
|
35
22
|
eventDispatcher: EventDispatcher;
|
|
36
23
|
transformer?: Transformer<string>;
|
|
24
|
+
view: EditorView;
|
|
37
25
|
}) => void;
|
|
38
26
|
onEditorDestroyed: (instance: {
|
|
39
|
-
view: EditorView;
|
|
40
27
|
config: EditorConfig;
|
|
41
28
|
eventDispatcher: EventDispatcher;
|
|
42
29
|
transformer?: Transformer<string>;
|
|
30
|
+
view: EditorView;
|
|
43
31
|
}) => void;
|
|
32
|
+
portalProviderAPI: PortalProviderAPI;
|
|
44
33
|
preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>;
|
|
34
|
+
providerFactory: ProviderFactory;
|
|
35
|
+
render?: (props: {
|
|
36
|
+
config: EditorConfig;
|
|
37
|
+
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
38
|
+
editor: JSX.Element;
|
|
39
|
+
editorAPI: PublicPluginAPI<any> | undefined;
|
|
40
|
+
editorRef: React.RefObject<HTMLDivElement>;
|
|
41
|
+
eventDispatcher: EventDispatcher;
|
|
42
|
+
transformer?: Transformer<string>;
|
|
43
|
+
view?: EditorView;
|
|
44
|
+
}) => JSX.Element;
|
|
45
45
|
}
|
|
46
46
|
export declare function ReactEditorView(props: EditorViewProps): React.JSX.Element;
|
|
47
47
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<EditorViewProps>> & {
|
|
@@ -14,8 +14,8 @@ type toDOMType = (node: PMNode | PMMark) => DOMOutputSpec;
|
|
|
14
14
|
* @returns {DOMOutputSpec} The modified DOMOutputSpec with additional metadata.
|
|
15
15
|
*/
|
|
16
16
|
export declare const addMetadataAttributes: ({ nodeOrMark, domSpec, }: {
|
|
17
|
-
nodeOrMark: PMNode | PMMark;
|
|
18
17
|
domSpec: DOMOutputSpec;
|
|
18
|
+
nodeOrMark: PMNode | PMMark;
|
|
19
19
|
}) => DOMOutputSpec;
|
|
20
20
|
/**
|
|
21
21
|
* 🧱 Internal Helper Function: Editor FE Platform
|