@atlaskit/editor-core 185.1.1 → 185.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/cjs/create-editor/create-editor.js +4 -0
- package/dist/cjs/editor-next/editor-internal.js +2 -1
- package/dist/cjs/test-utils.js +4 -0
- package/dist/cjs/ui/Appearance/Chromeless.js +4 -2
- package/dist/cjs/ui/Appearance/Comment/Comment.js +5 -6
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +2 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +2 -4
- package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +1 -1
- package/dist/cjs/ui/Appearance/Mobile.js +29 -4
- package/dist/cjs/ui/AppearanceComponents/Mobile.js +7 -5
- package/dist/cjs/ui/ContextPanel/index.js +7 -1
- package/dist/cjs/ui/PluginSlot/index.js +11 -5
- package/dist/cjs/ui/PluginSlot/mount-plugin-hooks.js +34 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/create-editor/create-editor.js +4 -0
- package/dist/es2019/editor-next/editor-internal.js +2 -1
- package/dist/es2019/test-utils.js +4 -0
- package/dist/es2019/ui/Appearance/Chromeless.js +4 -2
- package/dist/es2019/ui/Appearance/Comment/Comment.js +5 -6
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +2 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +2 -4
- package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +6 -1
- package/dist/es2019/ui/Appearance/Mobile.js +29 -4
- package/dist/es2019/ui/AppearanceComponents/Mobile.js +7 -6
- package/dist/es2019/ui/ContextPanel/index.js +6 -1
- package/dist/es2019/ui/PluginSlot/index.js +11 -5
- package/dist/es2019/ui/PluginSlot/mount-plugin-hooks.js +27 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/create-editor/create-editor.js +4 -0
- package/dist/esm/editor-next/editor-internal.js +2 -1
- package/dist/esm/test-utils.js +4 -0
- package/dist/esm/ui/Appearance/Chromeless.js +4 -2
- package/dist/esm/ui/Appearance/Comment/Comment.js +5 -6
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +2 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +2 -4
- package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +1 -1
- package/dist/esm/ui/Appearance/Mobile.js +29 -4
- package/dist/esm/ui/AppearanceComponents/Mobile.js +6 -5
- package/dist/esm/ui/ContextPanel/index.js +5 -1
- package/dist/esm/ui/PluginSlot/index.js +11 -5
- package/dist/esm/ui/PluginSlot/mount-plugin-hooks.js +27 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/create-editor/get-plugins.d.ts +2 -1
- package/dist/types/test-utils.d.ts +2 -1
- package/dist/types/types/editor-appearance-component.d.ts +3 -1
- package/dist/types/types/editor-config.d.ts +2 -1
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +3 -1
- package/dist/types/ui/Appearance/Mobile.d.ts +1 -1
- package/dist/types/ui/AppearanceComponents/Mobile.d.ts +8 -8
- package/dist/types/ui/ContextPanel/index.d.ts +1 -0
- package/dist/types/ui/PluginSlot/index.d.ts +3 -1
- package/dist/types/ui/PluginSlot/mount-plugin-hooks.d.ts +10 -0
- package/dist/types-ts4.5/create-editor/get-plugins.d.ts +2 -1
- package/dist/types-ts4.5/test-utils.d.ts +2 -1
- package/dist/types-ts4.5/types/editor-appearance-component.d.ts +3 -1
- package/dist/types-ts4.5/types/editor-config.d.ts +2 -1
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageContentArea.d.ts +3 -1
- package/dist/types-ts4.5/ui/Appearance/Mobile.d.ts +1 -1
- package/dist/types-ts4.5/ui/AppearanceComponents/Mobile.d.ts +8 -8
- package/dist/types-ts4.5/ui/ContextPanel/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/PluginSlot/index.d.ts +3 -1
- package/dist/types-ts4.5/ui/PluginSlot/mount-plugin-hooks.d.ts +10 -0
- package/package.json +6 -6
- package/report.api.md +3 -0
- package/tmp/api-report-tmp.d.ts +2426 -0
- package/dist/cjs/ui/WidthEmitter/index.js +0 -64
- package/dist/es2019/ui/WidthEmitter/index.js +0 -56
- package/dist/esm/ui/WidthEmitter/index.js +0 -53
- package/dist/types/ui/WidthEmitter/index.d.ts +0 -7
- package/dist/types-ts4.5/ui/WidthEmitter/index.d.ts +0 -7
|
@@ -10,6 +10,7 @@ export type Props = {
|
|
|
10
10
|
};
|
|
11
11
|
type EditorWidth = WidthPluginState & {
|
|
12
12
|
contentBreakoutModes: BreakoutMarkAttrs['mode'][];
|
|
13
|
+
containerWidth?: number;
|
|
13
14
|
};
|
|
14
15
|
export declare const shouldPanelBePositionedOverEditor: (editorWidth: EditorWidth, panelWidth: number) => boolean;
|
|
15
16
|
export declare const panel: import("@emotion/react").SerializedStyles;
|
|
@@ -6,9 +6,11 @@ import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
|
6
6
|
import { EditorAppearance, UIComponentFactory } from '../../types';
|
|
7
7
|
import { EventDispatcher } from '../../event-dispatcher';
|
|
8
8
|
import EditorActions from '../../actions';
|
|
9
|
-
import { DispatchAnalyticsEvent } from '
|
|
9
|
+
import { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
10
|
+
import type { ReactHookFactory } from '@atlaskit/editor-common/types';
|
|
10
11
|
export interface Props {
|
|
11
12
|
items?: UIComponentFactory[];
|
|
13
|
+
pluginHooks?: ReactHookFactory[];
|
|
12
14
|
editorView?: EditorView;
|
|
13
15
|
editorActions?: EditorActions;
|
|
14
16
|
eventDispatcher?: EventDispatcher;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ReactHookFactory } from '@atlaskit/editor-common/types';
|
|
3
|
+
import { EditorView } from 'prosemirror-view';
|
|
4
|
+
interface MountPluginHooksProps {
|
|
5
|
+
editorView: EditorView | undefined;
|
|
6
|
+
pluginHooks: ReactHookFactory[] | undefined;
|
|
7
|
+
containerElement: HTMLElement | null;
|
|
8
|
+
}
|
|
9
|
+
export declare function MountPluginHooks({ pluginHooks, editorView, containerElement, }: MountPluginHooksProps): JSX.Element | null;
|
|
10
|
+
export {};
|
|
@@ -7,7 +7,7 @@ import { MarkConfig, NodeConfig } from '../types/pm-config';
|
|
|
7
7
|
import { EditorReactContext } from '../types/editor-react-context';
|
|
8
8
|
import { FeatureFlags } from '../types/feature-flags';
|
|
9
9
|
import { IntlShape } from 'react-intl-next';
|
|
10
|
-
import { UIComponentFactory } from '@atlaskit/editor-common/types';
|
|
10
|
+
import type { UIComponentFactory, ReactHookFactory } from '@atlaskit/editor-common/types';
|
|
11
11
|
export type LightPMPluginFactoryParams = {
|
|
12
12
|
schema: Schema;
|
|
13
13
|
dispatch: Dispatch;
|
|
@@ -38,6 +38,7 @@ export interface LightEditorPlugin {
|
|
|
38
38
|
nodes?: () => NodeConfig[];
|
|
39
39
|
pmPlugins?: (pluginOptions?: any) => Array<LightPMPlugin>;
|
|
40
40
|
contentComponent?: UIComponentFactory;
|
|
41
|
+
usePluginHook?: ReactHookFactory;
|
|
41
42
|
pluginsOptions?: Record<string, any>;
|
|
42
43
|
onEditorViewStateUpdated?: OnEditorViewStateUpdated;
|
|
43
44
|
}
|
|
@@ -8,12 +8,13 @@ export type { LightEditorPlugin } from './create-editor/get-plugins';
|
|
|
8
8
|
export type { DispatchAnalyticsEvent } from './plugins/analytics/types';
|
|
9
9
|
export type { FeatureFlags } from './types/feature-flags';
|
|
10
10
|
import { EditorPresetBuilder, type EditorPluginInjectionAPI } from '@atlaskit/editor-common/preset';
|
|
11
|
-
import type { AllEditorPresetPluginTypes, UIComponentFactory } from '@atlaskit/editor-common/types';
|
|
11
|
+
import type { AllEditorPresetPluginTypes, UIComponentFactory, ReactHookFactory } from '@atlaskit/editor-common/types';
|
|
12
12
|
export interface LightEditorConfig {
|
|
13
13
|
nodes: NodeConfig[];
|
|
14
14
|
marks: MarkConfig[];
|
|
15
15
|
plugins: Array<LightPMPlugin>;
|
|
16
16
|
contentComponents: UIComponentFactory[];
|
|
17
|
+
pluginHooks: ReactHookFactory[];
|
|
17
18
|
onEditorViewStateUpdatedCallbacks: Array<OnEditorViewStateUpdated>;
|
|
18
19
|
}
|
|
19
20
|
export declare function getFireAnalytics(editorView: EditorView): any;
|
|
@@ -8,11 +8,12 @@ import { UIComponentFactory } from '../types/ui-components';
|
|
|
8
8
|
import { ReactComponents, PrimaryToolbarComponents, UseStickyToolbarType } from '../types/editor-props';
|
|
9
9
|
import { ToolbarUIComponentFactory } from '../ui/Toolbar/types';
|
|
10
10
|
import { CollabEditOptions } from '../plugins/collab-edit/types';
|
|
11
|
-
import { DispatchAnalyticsEvent } from '
|
|
11
|
+
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
12
12
|
import { EditorAppearance } from './editor-appearance';
|
|
13
13
|
import { MenuItem } from '../ui/DropdownMenu/types';
|
|
14
14
|
import { ReactElement } from 'react';
|
|
15
15
|
import { FeatureFlags } from './feature-flags';
|
|
16
|
+
import type { ReactHookFactory } from '@atlaskit/editor-common/types';
|
|
16
17
|
export interface EditorAppearanceComponentProps {
|
|
17
18
|
appearance?: EditorAppearance;
|
|
18
19
|
onSave?: (editorView: EditorView) => void;
|
|
@@ -26,6 +27,7 @@ export interface EditorAppearanceComponentProps {
|
|
|
26
27
|
maxHeight?: number;
|
|
27
28
|
minHeight?: number;
|
|
28
29
|
contentComponents?: UIComponentFactory[];
|
|
30
|
+
pluginHooks?: ReactHookFactory[];
|
|
29
31
|
primaryToolbarComponents?: ToolbarUIComponentFactory[];
|
|
30
32
|
primaryToolbarIconBefore?: ReactElement;
|
|
31
33
|
secondaryToolbarComponents?: UIComponentFactory[];
|
|
@@ -2,7 +2,7 @@ import { ToolbarUIComponentFactory } from '../ui/Toolbar/types';
|
|
|
2
2
|
import { Transaction, EditorState } from 'prosemirror-state';
|
|
3
3
|
import { PMPlugin } from './pm-plugin';
|
|
4
4
|
import { MarkConfig, NodeConfig } from './pm-config';
|
|
5
|
-
import { UIComponentFactory } from '
|
|
5
|
+
import type { UIComponentFactory, ReactHookFactory } from '@atlaskit/editor-common/types';
|
|
6
6
|
type EditorViewStateUpdatedCallbackProps = {
|
|
7
7
|
readonly originalTransaction: Readonly<Transaction>;
|
|
8
8
|
readonly transactions: Transaction[];
|
|
@@ -14,6 +14,7 @@ export interface EditorConfig {
|
|
|
14
14
|
marks: MarkConfig[];
|
|
15
15
|
pmPlugins: Array<PMPlugin>;
|
|
16
16
|
contentComponents: UIComponentFactory[];
|
|
17
|
+
pluginHooks: ReactHookFactory[];
|
|
17
18
|
primaryToolbarComponents: ToolbarUIComponentFactory[];
|
|
18
19
|
secondaryToolbarComponents: UIComponentFactory[];
|
|
19
20
|
onEditorViewStateUpdatedCallbacks: Array<{
|
|
@@ -5,11 +5,13 @@ import { WrappedComponentProps } from 'react-intl-next';
|
|
|
5
5
|
import EditorActions from '../../../actions';
|
|
6
6
|
import { EventDispatcher } from '../../../event-dispatcher';
|
|
7
7
|
import { ReactComponents, EditorAppearance, UIComponentFactory } from '../../../types';
|
|
8
|
-
import { DispatchAnalyticsEvent } from '
|
|
8
|
+
import { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
9
|
+
import type { ReactHookFactory } from '@atlaskit/editor-common/types';
|
|
9
10
|
interface FullPageEditorContentAreaProps {
|
|
10
11
|
appearance: EditorAppearance | undefined;
|
|
11
12
|
contentArea: HTMLElement | undefined;
|
|
12
13
|
contentComponents: UIComponentFactory[] | undefined;
|
|
14
|
+
pluginHooks: ReactHookFactory[] | undefined;
|
|
13
15
|
contextPanel: ReactComponents | undefined;
|
|
14
16
|
customContentComponents: ReactComponents | undefined;
|
|
15
17
|
disabled: boolean | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { EditorAppearanceComponentProps } from '../../types';
|
|
3
|
-
export default function Mobile({ editorView, maxHeight, persistScrollGutter, editorDOMElement, disabled, }: EditorAppearanceComponentProps): JSX.Element;
|
|
3
|
+
export default function Mobile({ editorView, maxHeight, persistScrollGutter, editorDOMElement, disabled, contentComponents, editorActions, eventDispatcher, dispatchAnalyticsEvent, providerFactory, appearance, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, innerRef, pluginHooks, }: EditorAppearanceComponentProps): JSX.Element;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
4
3
|
import { EditorView } from 'prosemirror-view';
|
|
5
|
-
|
|
4
|
+
export declare const MobileAppearance: React.ForwardRefExoticComponent<{
|
|
6
5
|
editorView: EditorView | null;
|
|
7
|
-
maxHeight?: number;
|
|
8
|
-
persistScrollGutter?: boolean;
|
|
9
|
-
editorDisabled?: boolean;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
maxHeight?: number | undefined;
|
|
7
|
+
persistScrollGutter?: boolean | undefined;
|
|
8
|
+
editorDisabled?: boolean | undefined;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
} & {
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -10,6 +10,7 @@ export type Props = {
|
|
|
10
10
|
};
|
|
11
11
|
type EditorWidth = WidthPluginState & {
|
|
12
12
|
contentBreakoutModes: BreakoutMarkAttrs['mode'][];
|
|
13
|
+
containerWidth?: number;
|
|
13
14
|
};
|
|
14
15
|
export declare const shouldPanelBePositionedOverEditor: (editorWidth: EditorWidth, panelWidth: number) => boolean;
|
|
15
16
|
export declare const panel: import("@emotion/react").SerializedStyles;
|
|
@@ -6,9 +6,11 @@ import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
|
6
6
|
import { EditorAppearance, UIComponentFactory } from '../../types';
|
|
7
7
|
import { EventDispatcher } from '../../event-dispatcher';
|
|
8
8
|
import EditorActions from '../../actions';
|
|
9
|
-
import { DispatchAnalyticsEvent } from '
|
|
9
|
+
import { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
10
|
+
import type { ReactHookFactory } from '@atlaskit/editor-common/types';
|
|
10
11
|
export interface Props {
|
|
11
12
|
items?: UIComponentFactory[];
|
|
13
|
+
pluginHooks?: ReactHookFactory[];
|
|
12
14
|
editorView?: EditorView;
|
|
13
15
|
editorActions?: EditorActions;
|
|
14
16
|
eventDispatcher?: EventDispatcher;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ReactHookFactory } from '@atlaskit/editor-common/types';
|
|
3
|
+
import { EditorView } from 'prosemirror-view';
|
|
4
|
+
interface MountPluginHooksProps {
|
|
5
|
+
editorView: EditorView | undefined;
|
|
6
|
+
pluginHooks: ReactHookFactory[] | undefined;
|
|
7
|
+
containerElement: HTMLElement | null;
|
|
8
|
+
}
|
|
9
|
+
export declare function MountPluginHooks({ pluginHooks, editorView, containerElement, }: MountPluginHooksProps): JSX.Element | null;
|
|
10
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "185.1.
|
|
3
|
+
"version": "185.1.3",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"singleton": true,
|
|
28
28
|
"deprecatedAutoEntryPoints": true,
|
|
29
29
|
"inPublicMirror": true,
|
|
30
|
-
"releaseModel": "
|
|
30
|
+
"releaseModel": "continuous",
|
|
31
31
|
"website": {
|
|
32
32
|
"name": "Editor Core"
|
|
33
33
|
}
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@atlaskit/code": "^14.6.0",
|
|
50
50
|
"@atlaskit/date": "^0.10.0",
|
|
51
51
|
"@atlaskit/datetime-picker": "^12.7.0",
|
|
52
|
-
"@atlaskit/editor-common": "^74.
|
|
52
|
+
"@atlaskit/editor-common": "^74.5.0",
|
|
53
53
|
"@atlaskit/editor-json-transformer": "^8.9.0",
|
|
54
54
|
"@atlaskit/editor-markdown-transformer": "^5.2.0",
|
|
55
55
|
"@atlaskit/editor-palette": "1.4.2",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@atlaskit/editor-plugin-feature-flags": "^0.1.0",
|
|
60
60
|
"@atlaskit/editor-plugin-grid": "^0.1.0",
|
|
61
61
|
"@atlaskit/editor-plugin-table": "^1.5.0",
|
|
62
|
-
"@atlaskit/editor-plugin-width": "^0.0
|
|
62
|
+
"@atlaskit/editor-plugin-width": "^0.1.0",
|
|
63
63
|
"@atlaskit/editor-shared-styles": "^2.4.0",
|
|
64
64
|
"@atlaskit/editor-tables": "^2.3.0",
|
|
65
65
|
"@atlaskit/emoji": "^67.4.0",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@atlaskit/logo": "^13.14.0",
|
|
74
74
|
"@atlaskit/media-card": "^76.0.0",
|
|
75
75
|
"@atlaskit/media-client": "^23.0.0",
|
|
76
|
-
"@atlaskit/media-common": "^
|
|
76
|
+
"@atlaskit/media-common": "^7.0.0",
|
|
77
77
|
"@atlaskit/media-filmstrip": "^47.0.0",
|
|
78
78
|
"@atlaskit/media-picker": "^66.0.0",
|
|
79
79
|
"@atlaskit/media-ui": "^23.0.0",
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
"@atlaskit/atlassian-navigation": "^2.6.0",
|
|
150
150
|
"@atlaskit/breadcrumbs": "11.10.4",
|
|
151
151
|
"@atlaskit/code": "^14.6.0",
|
|
152
|
-
"@atlaskit/collab-provider": "9.
|
|
152
|
+
"@atlaskit/collab-provider": "9.2.0",
|
|
153
153
|
"@atlaskit/docs": "*",
|
|
154
154
|
"@atlaskit/drawer": "^7.5.0",
|
|
155
155
|
"@atlaskit/dropdown-menu": "^11.9.0",
|
package/report.api.md
CHANGED
|
@@ -131,6 +131,7 @@ import { QuickInsertItemId } from '@atlaskit/editor-common/provider-factory';
|
|
|
131
131
|
import { QuickInsertProvider } from '@atlaskit/editor-common/provider-factory';
|
|
132
132
|
import { default as React_2 } from 'react';
|
|
133
133
|
import { ReactElement } from 'react';
|
|
134
|
+
import type { ReactHookFactory } from '@atlaskit/editor-common/types';
|
|
134
135
|
import { RefObject } from 'react';
|
|
135
136
|
import { ReplaceRawValue } from '@atlaskit/editor-common/types';
|
|
136
137
|
import type { ResolvedEditorState } from '@atlaskit/collab-provider';
|
|
@@ -745,6 +746,8 @@ interface EditorConfig {
|
|
|
745
746
|
callback: (props: EditorViewStateUpdatedCallbackProps) => void;
|
|
746
747
|
}>;
|
|
747
748
|
// (undocumented)
|
|
749
|
+
pluginHooks: ReactHookFactory[];
|
|
750
|
+
// (undocumented)
|
|
748
751
|
pmPlugins: Array<PMPlugin>;
|
|
749
752
|
// (undocumented)
|
|
750
753
|
primaryToolbarComponents: ToolbarUIComponentFactory[];
|