@atlaskit/editor-core 203.11.6 → 203.11.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/composable-editor/editor-internal.js +2 -94
  3. package/dist/cjs/create-editor/ReactEditorViewNext.js +1 -0
  4. package/dist/cjs/ui/ContentStyles/code-block.js +1 -1
  5. package/dist/cjs/ui/ContentStyles/index.js +3 -3
  6. package/dist/cjs/version-wrapper.js +1 -1
  7. package/dist/es2019/composable-editor/editor-internal.js +3 -93
  8. package/dist/es2019/create-editor/ReactEditorViewNext.js +1 -1
  9. package/dist/es2019/ui/ContentStyles/code-block.js +2 -1
  10. package/dist/es2019/ui/ContentStyles/index.js +13 -0
  11. package/dist/es2019/version-wrapper.js +1 -1
  12. package/dist/esm/composable-editor/editor-internal.js +3 -95
  13. package/dist/esm/create-editor/ReactEditorViewNext.js +1 -1
  14. package/dist/esm/ui/ContentStyles/code-block.js +1 -1
  15. package/dist/esm/ui/ContentStyles/index.js +3 -3
  16. package/dist/esm/version-wrapper.js +1 -1
  17. package/dist/types/create-editor/ReactEditorViewNext.d.ts +1 -0
  18. package/dist/types/create-editor/create-universal-preset.d.ts +2 -6
  19. package/dist/types/presets/default.d.ts +4 -12
  20. package/dist/types/presets/universal.d.ts +2 -6
  21. package/dist/types/presets/useUniversalPreset.d.ts +2 -6
  22. package/dist/types-ts4.5/create-editor/ReactEditorViewNext.d.ts +1 -0
  23. package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +2 -6
  24. package/dist/types-ts4.5/presets/default.d.ts +4 -12
  25. package/dist/types-ts4.5/presets/universal.d.ts +2 -6
  26. package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +2 -6
  27. package/package.json +5 -5
  28. package/dist/cjs/create-editor/ReactEditorView.js +0 -712
  29. package/dist/es2019/create-editor/ReactEditorView.js +0 -658
  30. package/dist/esm/create-editor/ReactEditorView.js +0 -705
  31. package/dist/types/create-editor/ReactEditorView.d.ts +0 -117
  32. package/dist/types-ts4.5/create-editor/ReactEditorView.d.ts +0 -117
@@ -1,117 +0,0 @@
1
- import React from 'react';
2
- import type { WrappedComponentProps } from 'react-intl-next';
3
- import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
4
- import { FULL_WIDTH_MODE } from '@atlaskit/editor-common/analytics';
5
- import type { AnalyticsEventPayload, DispatchAnalyticsEvent, FireAnalyticsCallback } from '@atlaskit/editor-common/analytics';
6
- import type { ErrorReporter } from '@atlaskit/editor-common/error-reporter';
7
- import { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
8
- import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
9
- import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
10
- import type { AllEditorPresetPluginTypes, EditorPresetBuilder } from '@atlaskit/editor-common/preset';
11
- import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
12
- import type { EditorAppearance, EditorPlugin, PublicPluginAPI, Transformer } from '@atlaskit/editor-common/types';
13
- import { type SEVERITY } from '@atlaskit/editor-common/utils/analytics';
14
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
15
- import { EditorState } from '@atlaskit/editor-prosemirror/state';
16
- import { EditorView } from '@atlaskit/editor-prosemirror/view';
17
- import type { DirectEditorProps } from '@atlaskit/editor-prosemirror/view';
18
- import type { EditorConfig, EditorProps } from '../types';
19
- import type { EditorNextProps } from '../types/editor-props';
20
- export interface EditorViewProps {
21
- editorProps: (EditorProps | EditorNextProps) & {
22
- preset?: EditorNextProps['preset'];
23
- };
24
- createAnalyticsEvent?: CreateUIAnalyticsEvent;
25
- providerFactory: ProviderFactory;
26
- portalProviderAPI: PortalProviderAPI;
27
- nodeViewPortalProviderAPI: PortalProviderAPI;
28
- disabled?: boolean;
29
- editorAPI: PublicPluginAPI<any> | undefined;
30
- setEditorAPI?: (editorApi: PublicPluginAPI<any>) => void;
31
- render?: (props: {
32
- editor: JSX.Element;
33
- view?: EditorView;
34
- config: EditorConfig;
35
- eventDispatcher: EventDispatcher;
36
- transformer?: Transformer<string>;
37
- dispatchAnalyticsEvent: DispatchAnalyticsEvent;
38
- editorRef: React.RefObject<HTMLDivElement>;
39
- editorAPI: PublicPluginAPI<any> | undefined;
40
- }) => JSX.Element;
41
- onEditorCreated: (instance: {
42
- view: EditorView;
43
- config: EditorConfig;
44
- eventDispatcher: EventDispatcher;
45
- transformer?: Transformer<string>;
46
- }) => void;
47
- onEditorDestroyed: (instance: {
48
- view: EditorView;
49
- config: EditorConfig;
50
- eventDispatcher: EventDispatcher;
51
- transformer?: Transformer<string>;
52
- }) => void;
53
- preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>;
54
- }
55
- interface CreateEditorStateOptions {
56
- props: EditorViewProps;
57
- doc?: string | Object | PMNode;
58
- resetting?: boolean;
59
- selectionAtStart?: boolean;
60
- }
61
- export declare class ReactEditorView<T = Object> extends React.Component<EditorViewProps & WrappedComponentProps & T, Object> {
62
- view?: EditorView;
63
- eventDispatcher: EventDispatcher;
64
- contentTransformer?: Transformer<string>;
65
- config: EditorConfig;
66
- editorState: EditorState;
67
- errorReporter: ErrorReporter;
68
- dispatch: Dispatch;
69
- proseMirrorRenderedSeverity?: SEVERITY;
70
- editorRef: React.RefObject<HTMLDivElement>;
71
- private canDispatchTransactions;
72
- private focusTimeoutId?;
73
- private reliabilityInterval?;
74
- private pluginPerformanceObserver;
75
- private featureFlags;
76
- private pluginInjectionAPI;
77
- private onPluginObservation;
78
- get transactionTracking(): {
79
- enabled: boolean;
80
- };
81
- private getPluginNames;
82
- private countNodes;
83
- constructor(props: EditorViewProps & WrappedComponentProps & T);
84
- getEditorState: () => EditorState | undefined;
85
- getEditorView: () => EditorView | undefined;
86
- UNSAFE_componentWillReceiveProps(nextProps: EditorViewProps): void;
87
- formatFullWidthAppearance: (appearance: EditorAppearance | undefined) => FULL_WIDTH_MODE;
88
- resetEditorState: ({ doc, shouldScrollToBottom, }: {
89
- doc: string;
90
- shouldScrollToBottom: boolean;
91
- }) => void;
92
- blur: () => void;
93
- reconfigureState(props: EditorViewProps): void;
94
- handleAnalyticsEvent: FireAnalyticsCallback;
95
- componentDidMount(): void;
96
- /**
97
- * Clean up any non-PM resources when the editor is unmounted
98
- */
99
- componentWillUnmount(): void;
100
- private editorPlugins;
101
- getPlugins(preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>): EditorPlugin[];
102
- createEditorState: (options: CreateEditorStateOptions) => EditorState;
103
- private onEditorViewStateUpdated;
104
- private dispatchTransaction;
105
- getDirectEditorProps: (state?: EditorState) => DirectEditorProps;
106
- private createEditorView;
107
- handleEditorViewRef: (node: HTMLDivElement) => void;
108
- dispatchAnalyticsEvent: (payload: AnalyticsEventPayload) => void;
109
- private editorId;
110
- private createEditor;
111
- private editor;
112
- render(): JSX.Element;
113
- }
114
- declare const _default: React.FC<import("react-intl-next").WithIntlProps<EditorViewProps & WrappedComponentProps>> & {
115
- WrappedComponent: React.ComponentType<EditorViewProps & WrappedComponentProps>;
116
- };
117
- export default _default;
@@ -1,117 +0,0 @@
1
- import React from 'react';
2
- import type { WrappedComponentProps } from 'react-intl-next';
3
- import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
4
- import { FULL_WIDTH_MODE } from '@atlaskit/editor-common/analytics';
5
- import type { AnalyticsEventPayload, DispatchAnalyticsEvent, FireAnalyticsCallback } from '@atlaskit/editor-common/analytics';
6
- import type { ErrorReporter } from '@atlaskit/editor-common/error-reporter';
7
- import { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
8
- import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
9
- import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
10
- import type { AllEditorPresetPluginTypes, EditorPresetBuilder } from '@atlaskit/editor-common/preset';
11
- import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
12
- import type { EditorAppearance, EditorPlugin, PublicPluginAPI, Transformer } from '@atlaskit/editor-common/types';
13
- import { type SEVERITY } from '@atlaskit/editor-common/utils/analytics';
14
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
15
- import { EditorState } from '@atlaskit/editor-prosemirror/state';
16
- import { EditorView } from '@atlaskit/editor-prosemirror/view';
17
- import type { DirectEditorProps } from '@atlaskit/editor-prosemirror/view';
18
- import type { EditorConfig, EditorProps } from '../types';
19
- import type { EditorNextProps } from '../types/editor-props';
20
- export interface EditorViewProps {
21
- editorProps: (EditorProps | EditorNextProps) & {
22
- preset?: EditorNextProps['preset'];
23
- };
24
- createAnalyticsEvent?: CreateUIAnalyticsEvent;
25
- providerFactory: ProviderFactory;
26
- portalProviderAPI: PortalProviderAPI;
27
- nodeViewPortalProviderAPI: PortalProviderAPI;
28
- disabled?: boolean;
29
- editorAPI: PublicPluginAPI<any> | undefined;
30
- setEditorAPI?: (editorApi: PublicPluginAPI<any>) => void;
31
- render?: (props: {
32
- editor: JSX.Element;
33
- view?: EditorView;
34
- config: EditorConfig;
35
- eventDispatcher: EventDispatcher;
36
- transformer?: Transformer<string>;
37
- dispatchAnalyticsEvent: DispatchAnalyticsEvent;
38
- editorRef: React.RefObject<HTMLDivElement>;
39
- editorAPI: PublicPluginAPI<any> | undefined;
40
- }) => JSX.Element;
41
- onEditorCreated: (instance: {
42
- view: EditorView;
43
- config: EditorConfig;
44
- eventDispatcher: EventDispatcher;
45
- transformer?: Transformer<string>;
46
- }) => void;
47
- onEditorDestroyed: (instance: {
48
- view: EditorView;
49
- config: EditorConfig;
50
- eventDispatcher: EventDispatcher;
51
- transformer?: Transformer<string>;
52
- }) => void;
53
- preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>;
54
- }
55
- interface CreateEditorStateOptions {
56
- props: EditorViewProps;
57
- doc?: string | Object | PMNode;
58
- resetting?: boolean;
59
- selectionAtStart?: boolean;
60
- }
61
- export declare class ReactEditorView<T = Object> extends React.Component<EditorViewProps & WrappedComponentProps & T, Object> {
62
- view?: EditorView;
63
- eventDispatcher: EventDispatcher;
64
- contentTransformer?: Transformer<string>;
65
- config: EditorConfig;
66
- editorState: EditorState;
67
- errorReporter: ErrorReporter;
68
- dispatch: Dispatch;
69
- proseMirrorRenderedSeverity?: SEVERITY;
70
- editorRef: React.RefObject<HTMLDivElement>;
71
- private canDispatchTransactions;
72
- private focusTimeoutId?;
73
- private reliabilityInterval?;
74
- private pluginPerformanceObserver;
75
- private featureFlags;
76
- private pluginInjectionAPI;
77
- private onPluginObservation;
78
- get transactionTracking(): {
79
- enabled: boolean;
80
- };
81
- private getPluginNames;
82
- private countNodes;
83
- constructor(props: EditorViewProps & WrappedComponentProps & T);
84
- getEditorState: () => EditorState | undefined;
85
- getEditorView: () => EditorView | undefined;
86
- UNSAFE_componentWillReceiveProps(nextProps: EditorViewProps): void;
87
- formatFullWidthAppearance: (appearance: EditorAppearance | undefined) => FULL_WIDTH_MODE;
88
- resetEditorState: ({ doc, shouldScrollToBottom, }: {
89
- doc: string;
90
- shouldScrollToBottom: boolean;
91
- }) => void;
92
- blur: () => void;
93
- reconfigureState(props: EditorViewProps): void;
94
- handleAnalyticsEvent: FireAnalyticsCallback;
95
- componentDidMount(): void;
96
- /**
97
- * Clean up any non-PM resources when the editor is unmounted
98
- */
99
- componentWillUnmount(): void;
100
- private editorPlugins;
101
- getPlugins(preset: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>): EditorPlugin[];
102
- createEditorState: (options: CreateEditorStateOptions) => EditorState;
103
- private onEditorViewStateUpdated;
104
- private dispatchTransaction;
105
- getDirectEditorProps: (state?: EditorState) => DirectEditorProps;
106
- private createEditorView;
107
- handleEditorViewRef: (node: HTMLDivElement) => void;
108
- dispatchAnalyticsEvent: (payload: AnalyticsEventPayload) => void;
109
- private editorId;
110
- private createEditor;
111
- private editor;
112
- render(): JSX.Element;
113
- }
114
- declare const _default: React.FC<import("react-intl-next").WithIntlProps<EditorViewProps & WrappedComponentProps>> & {
115
- WrappedComponent: React.ComponentType<EditorViewProps & WrappedComponentProps>;
116
- };
117
- export default _default;