@atlaskit/editor-core 186.0.0 → 187.0.0

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 (112) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/cjs/labs-next.js +0 -65
  3. package/dist/cjs/plugins/expand/commands.js +2 -0
  4. package/dist/cjs/plugins/expand/index.js +1 -1
  5. package/dist/cjs/version-wrapper.js +1 -1
  6. package/dist/cjs/version.json +1 -1
  7. package/dist/es2019/labs-next.js +0 -4
  8. package/dist/es2019/plugins/expand/commands.js +2 -0
  9. package/dist/es2019/plugins/expand/index.js +1 -1
  10. package/dist/es2019/version-wrapper.js +1 -1
  11. package/dist/es2019/version.json +1 -1
  12. package/dist/esm/labs-next.js +0 -4
  13. package/dist/esm/plugins/expand/commands.js +2 -0
  14. package/dist/esm/plugins/expand/index.js +1 -1
  15. package/dist/esm/version-wrapper.js +1 -1
  16. package/dist/esm/version.json +1 -1
  17. package/dist/types/labs/next/presets/default.d.ts +2 -3
  18. package/dist/types/labs-next.d.ts +0 -7
  19. package/dist/types/plugins/expand/commands.d.ts +3 -3
  20. package/dist/types/plugins/expand/index.d.ts +2 -2
  21. package/dist/types-ts4.5/labs/next/presets/default.d.ts +2 -3
  22. package/dist/types-ts4.5/labs-next.d.ts +0 -7
  23. package/dist/types-ts4.5/plugins/expand/commands.d.ts +3 -3
  24. package/dist/types-ts4.5/plugins/expand/index.d.ts +2 -2
  25. package/package.json +5 -5
  26. package/report.api.md +2 -26
  27. package/dist/cjs/labs/next/ContentComponents.js +0 -43
  28. package/dist/cjs/labs/next/Editor.js +0 -76
  29. package/dist/cjs/labs/next/Toolbar.js +0 -39
  30. package/dist/cjs/labs/next/full-page.js +0 -127
  31. package/dist/cjs/labs/next/internal/components/EditorContent.js +0 -25
  32. package/dist/cjs/labs/next/internal/components/EditorInternal.js +0 -81
  33. package/dist/cjs/labs/next/internal/context/preset-context.js +0 -15
  34. package/dist/cjs/labs/next/internal/context/shared-config.js +0 -77
  35. package/dist/cjs/labs/next/internal/editor-props-type.js +0 -5
  36. package/dist/cjs/labs/next/internal/hooks/use-analytics/index.js +0 -41
  37. package/dist/cjs/labs/next/internal/hooks/use-editor/create-dispatch-transaction.js +0 -62
  38. package/dist/cjs/labs/next/internal/hooks/use-editor/create-editor.js +0 -94
  39. package/dist/cjs/labs/next/internal/hooks/use-editor/index.js +0 -193
  40. package/dist/cjs/labs/next/mobile.js +0 -37
  41. package/dist/cjs/labs/next/presets/cxhtml.js +0 -117
  42. package/dist/cjs/labs/next/presets/mobile.js +0 -130
  43. package/dist/cjs/labs/next/presets/utils.js +0 -30
  44. package/dist/es2019/labs/next/ContentComponents.js +0 -38
  45. package/dist/es2019/labs/next/Editor.js +0 -46
  46. package/dist/es2019/labs/next/Toolbar.js +0 -34
  47. package/dist/es2019/labs/next/full-page.js +0 -192
  48. package/dist/es2019/labs/next/internal/components/EditorContent.js +0 -17
  49. package/dist/es2019/labs/next/internal/components/EditorInternal.js +0 -66
  50. package/dist/es2019/labs/next/internal/context/preset-context.js +0 -5
  51. package/dist/es2019/labs/next/internal/context/shared-config.js +0 -34
  52. package/dist/es2019/labs/next/internal/editor-props-type.js +0 -1
  53. package/dist/es2019/labs/next/internal/hooks/use-analytics/index.js +0 -32
  54. package/dist/es2019/labs/next/internal/hooks/use-editor/create-dispatch-transaction.js +0 -51
  55. package/dist/es2019/labs/next/internal/hooks/use-editor/create-editor.js +0 -85
  56. package/dist/es2019/labs/next/internal/hooks/use-editor/index.js +0 -179
  57. package/dist/es2019/labs/next/mobile.js +0 -27
  58. package/dist/es2019/labs/next/presets/cxhtml.js +0 -106
  59. package/dist/es2019/labs/next/presets/mobile.js +0 -118
  60. package/dist/es2019/labs/next/presets/utils.js +0 -22
  61. package/dist/esm/labs/next/ContentComponents.js +0 -36
  62. package/dist/esm/labs/next/Editor.js +0 -48
  63. package/dist/esm/labs/next/Toolbar.js +0 -32
  64. package/dist/esm/labs/next/full-page.js +0 -121
  65. package/dist/esm/labs/next/internal/components/EditorContent.js +0 -17
  66. package/dist/esm/labs/next/internal/components/EditorInternal.js +0 -73
  67. package/dist/esm/labs/next/internal/context/preset-context.js +0 -7
  68. package/dist/esm/labs/next/internal/context/shared-config.js +0 -68
  69. package/dist/esm/labs/next/internal/editor-props-type.js +0 -1
  70. package/dist/esm/labs/next/internal/hooks/use-analytics/index.js +0 -34
  71. package/dist/esm/labs/next/internal/hooks/use-editor/create-dispatch-transaction.js +0 -55
  72. package/dist/esm/labs/next/internal/hooks/use-editor/create-editor.js +0 -88
  73. package/dist/esm/labs/next/internal/hooks/use-editor/index.js +0 -185
  74. package/dist/esm/labs/next/mobile.js +0 -25
  75. package/dist/esm/labs/next/presets/cxhtml.js +0 -108
  76. package/dist/esm/labs/next/presets/mobile.js +0 -120
  77. package/dist/esm/labs/next/presets/utils.js +0 -23
  78. package/dist/types/labs/next/ContentComponents.d.ts +0 -8
  79. package/dist/types/labs/next/Editor.d.ts +0 -27
  80. package/dist/types/labs/next/Toolbar.d.ts +0 -6
  81. package/dist/types/labs/next/full-page.d.ts +0 -9
  82. package/dist/types/labs/next/internal/components/EditorContent.d.ts +0 -7
  83. package/dist/types/labs/next/internal/components/EditorInternal.d.ts +0 -9
  84. package/dist/types/labs/next/internal/context/preset-context.d.ts +0 -5
  85. package/dist/types/labs/next/internal/context/shared-config.d.ts +0 -50
  86. package/dist/types/labs/next/internal/editor-props-type.d.ts +0 -29
  87. package/dist/types/labs/next/internal/hooks/use-analytics/index.d.ts +0 -8
  88. package/dist/types/labs/next/internal/hooks/use-editor/create-dispatch-transaction.d.ts +0 -6
  89. package/dist/types/labs/next/internal/hooks/use-editor/create-editor.d.ts +0 -19
  90. package/dist/types/labs/next/internal/hooks/use-editor/index.d.ts +0 -11
  91. package/dist/types/labs/next/mobile.d.ts +0 -12
  92. package/dist/types/labs/next/presets/cxhtml.d.ts +0 -338
  93. package/dist/types/labs/next/presets/mobile.d.ts +0 -343
  94. package/dist/types/labs/next/presets/utils.d.ts +0 -3
  95. package/dist/types-ts4.5/labs/next/ContentComponents.d.ts +0 -8
  96. package/dist/types-ts4.5/labs/next/Editor.d.ts +0 -27
  97. package/dist/types-ts4.5/labs/next/Toolbar.d.ts +0 -6
  98. package/dist/types-ts4.5/labs/next/full-page.d.ts +0 -9
  99. package/dist/types-ts4.5/labs/next/internal/components/EditorContent.d.ts +0 -7
  100. package/dist/types-ts4.5/labs/next/internal/components/EditorInternal.d.ts +0 -9
  101. package/dist/types-ts4.5/labs/next/internal/context/preset-context.d.ts +0 -5
  102. package/dist/types-ts4.5/labs/next/internal/context/shared-config.d.ts +0 -50
  103. package/dist/types-ts4.5/labs/next/internal/editor-props-type.d.ts +0 -29
  104. package/dist/types-ts4.5/labs/next/internal/hooks/use-analytics/index.d.ts +0 -8
  105. package/dist/types-ts4.5/labs/next/internal/hooks/use-editor/create-dispatch-transaction.d.ts +0 -6
  106. package/dist/types-ts4.5/labs/next/internal/hooks/use-editor/create-editor.d.ts +0 -19
  107. package/dist/types-ts4.5/labs/next/internal/hooks/use-editor/index.d.ts +0 -14
  108. package/dist/types-ts4.5/labs/next/mobile.d.ts +0 -12
  109. package/dist/types-ts4.5/labs/next/presets/cxhtml.d.ts +0 -414
  110. package/dist/types-ts4.5/labs/next/presets/mobile.d.ts +0 -419
  111. package/dist/types-ts4.5/labs/next/presets/utils.d.ts +0 -3
  112. package/tmp/api-report-tmp.d.ts +0 -2278
@@ -1,120 +0,0 @@
1
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- // #region Imports
3
- import React from 'react';
4
- import {
5
- // useProvider,
6
- useProviderFactory } from '@atlaskit/editor-common/provider-factory';
7
- //import analyticsPlugin from '../../../plugins/analytics';
8
- //import basePlugin from '../../../plugins/base';
9
- //import { cardPlugin } from '@atlaskit/editor-plugin-card';
10
- //import datePlugin from '../../../plugins/date';
11
- //import emojiPlugin from '../../../plugins/emoji';
12
- //import extensionPlugin from '../../../plugins/extension';
13
- //import layoutPlugin from '../../../plugins/layout';
14
- //import listPlugin from '../../../plugins/list';
15
- //import mentionsPlugin from '../../../plugins/mentions';
16
- //import mobileDimensionsPlugin from '../../../plugins/mobile-dimensions';
17
- //import panelPlugin from '../../../plugins/panel';
18
- //import placeholderPlugin from '../../../plugins/placeholder';
19
- //import rulePlugin from '../../../plugins/rule';
20
- //import statusPlugin from '../../../plugins/status';
21
- //import { tablesPlugin } from '@atlaskit/editor-plugin-table';
22
- //import tasksAndDecisionsPlugin from '../../../plugins/tasks-and-decisions';
23
- //import textColorPlugin from '../../../plugins/text-color';
24
- //import maxContentSizePlugin from '../../../plugins/max-content-size';
25
- //import expandPlugin from '../../../plugins/expand';
26
- //import selectionPlugin from '../../../plugins/selection';
27
- import { PresetProvider } from '../Editor';
28
- import { useDefaultPreset } from './default';
29
- import { addExcludesFromProviderFactory } from './utils';
30
- //import { quickInsertPlugin } from '../../../plugins';
31
-
32
- // #endregion
33
- export function useMobilePreset(_ref) {
34
- var media = _ref.media,
35
- placeholder = _ref.placeholder,
36
- maxContentSize = _ref.maxContentSize,
37
- createAnalyticsEvent = _ref.createAnalyticsEvent,
38
- featureFlags = _ref.featureFlags;
39
- //const mediaProvider = useProvider('mediaProvider');
40
- var _useDefaultPreset = useDefaultPreset({
41
- featureFlags: featureFlags,
42
- paste: {}
43
- }),
44
- _useDefaultPreset2 = _slicedToArray(_useDefaultPreset, 1),
45
- defaultPreset = _useDefaultPreset2[0];
46
- var preset = defaultPreset;
47
- //.add([
48
- // basePlugin,
49
- // {
50
- // allowScrollGutter: {
51
- // getScrollElement: () => document.body,
52
- // allowCustomScrollHandler: false,
53
- // },
54
- // },
55
- //])
56
- //.add([analyticsPlugin, createAnalyticsEvent])
57
- //.add([tablesPlugin, { tableOptions: { allowControls: false } }])
58
- //.add(panelPlugin)
59
- //.add(listPlugin)
60
- //.add(textColorPlugin)
61
- //.add(extensionPlugin)
62
- //.add(rulePlugin)
63
- //.add(datePlugin)
64
- //.add(layoutPlugin)
65
- //.add([quickInsertPlugin, { headless: true, disableDefaultItems: true }])
66
- //.add([statusPlugin, { menuDisabled: false }])
67
- //.add([placeholderPlugin, { placeholder }])
68
- //.add(mobileDimensionsPlugin)
69
- //.add(expandPlugin)
70
- ////.add([selectionPlugin, { useLongPressSelection: false }])
71
- //// Begin -> This would be exclude if the provider doesnt exist in the factory
72
- //.add(tasksAndDecisionsPlugin)
73
- //.add([cardPlugin, { allowBlockCards: true, platform: 'mobile' }])
74
- //.add(mentionsPlugin)
75
- //.add(emojiPlugin)
76
- //// End
77
- //.maybeAdd(maxContentSizePlugin, (plugin, builder) => {
78
- // if (maxContentSize) {
79
- // return builder.add([plugin, maxContentSize as any]);
80
- // }
81
- // return builder;
82
- //})
83
- //.maybeAdd(mediaPlugin, (plugin, builder) => {
84
- // if (media) {
85
- // return builder.add([
86
- // plugin,
87
- // {
88
- // provider: mediaProvider,
89
- // customMediaPicker: media.picker,
90
- // fullWidthEnabled: false,
91
- // allowMediaSingle: true,
92
- // allowLazyLoading: false,
93
- // allowMediaSingleEditable: false,
94
- // allowRemoteDimensionsFetch: false,
95
- // allowMarkingUploadsAsIncomplete: true,
96
- // allowAltTextOnImages: true,
97
- // allowTemplatePlaceholders: { allowInserting: true },
98
- // },
99
- // ]);
100
- // }
101
-
102
- // return builder;
103
- //});
104
-
105
- return [preset];
106
- }
107
- export function EditorPresetMobile(props) {
108
- var children = props.children,
109
- excludes = props.excludes;
110
- var _useMobilePreset = useMobilePreset(props),
111
- _useMobilePreset2 = _slicedToArray(_useMobilePreset, 1),
112
- preset = _useMobilePreset2[0];
113
- var providerFactory = useProviderFactory();
114
- var plugins = preset.build({
115
- excludePlugins: addExcludesFromProviderFactory(providerFactory, excludes)
116
- });
117
- return /*#__PURE__*/React.createElement(PresetProvider, {
118
- value: plugins
119
- }, children);
120
- }
@@ -1,23 +0,0 @@
1
- export var addExcludesFromProviderFactory = function addExcludesFromProviderFactory(providerFactory) {
2
- var excludes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Set();
3
- // TODO: Should I make this function pure?
4
- if (!providerFactory.hasProvider('mentionProvider')) {
5
- excludes.add('mention');
6
- }
7
- if (!providerFactory.hasProvider('emojiProvider')) {
8
- excludes.add('emoji');
9
- }
10
- if (!providerFactory.hasProvider('macroProvider')) {
11
- excludes.add('macro');
12
- }
13
- if (!providerFactory.hasProvider('autoformattingProvider')) {
14
- excludes.add('customAutoformat');
15
- }
16
- if (!providerFactory.hasProvider('taskDecisionProvider')) {
17
- excludes.add('taskDecision');
18
- }
19
- if (!providerFactory.hasProvider('cardProvider')) {
20
- excludes.add('card');
21
- }
22
- return excludes;
23
- };
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- type ContentComponentsProps = {
3
- disabled?: any;
4
- wrapperElement: HTMLElement | null;
5
- containerElement: HTMLElement | null;
6
- };
7
- export declare function ContentComponents({ disabled, wrapperElement, containerElement, }: ContentComponentsProps): JSX.Element | null;
8
- export {};
@@ -1,27 +0,0 @@
1
- /// <reference types="react" />
2
- import { PresetProvider } from './internal/context/preset-context';
3
- import { EditorSharedConfig, EditorSharedConfigConsumer, useEditorSharedConfig } from './internal/context/shared-config';
4
- import { EditorContent } from './internal/components/EditorContent';
5
- import { EditorProps } from './internal/editor-props-type';
6
- /**
7
- * Main Editor component. Use in combination with `EditorContent` and a `Preset`.
8
- * Internally it constructs `ProseMirror View` and mounts it to `EditorContent`.
9
- *
10
- * `EditorContent` can be wrapped to implement any layout/design requirements.
11
- *
12
- * ```js
13
- * <Preset>
14
- * <Editor>
15
- * <EditorContent/>
16
- * </Editor>
17
- * </Preset>
18
- * ```
19
- */
20
- declare function Editor(props: EditorProps): JSX.Element;
21
- /**
22
- *
23
- * Public API Exports.
24
- *
25
- */
26
- export { PresetProvider, Editor, EditorContent, EditorSharedConfigConsumer, useEditorSharedConfig, };
27
- export type { EditorProps, EditorSharedConfig, };
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- interface Props {
3
- containerElement: HTMLElement | null;
4
- }
5
- export declare function Toolbar({ containerElement }: Props): JSX.Element | null;
6
- export {};
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
3
- import { EditorProps } from '../../types';
4
- import EditorActions from '../../actions';
5
- export type FullPageProps = EditorProps & {
6
- onMount?: (actions: EditorActions) => void;
7
- } & WithAnalyticsEventsProps;
8
- declare const FullPageWithAnalytics: React.ForwardRefExoticComponent<Omit<FullPageProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
9
- export { FullPageWithAnalytics as FullPage };
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- declare const EditorContentProvider: React.Provider<(ref: HTMLDivElement) => void>;
3
- /**
4
- * ProseMirror View mount point.
5
- */
6
- declare const EditorContent: React.MemoExoticComponent<() => JSX.Element>;
7
- export { EditorContentProvider, EditorContent };
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { WrappedComponentProps } from 'react-intl-next';
3
- export declare const EditorInternal: React.FC<import("react-intl-next").WithIntlProps<import("../editor-props-type").EditorProps & {
4
- portalProviderAPI: import("@atlaskit/editor-common/portal-provider").PortalProviderAPI;
5
- } & WrappedComponentProps<"intl">>> & {
6
- WrappedComponent: React.ComponentType<import("../editor-props-type").EditorProps & {
7
- portalProviderAPI: import("@atlaskit/editor-common/portal-provider").PortalProviderAPI;
8
- } & WrappedComponentProps<"intl">>;
9
- };
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { EditorPlugin } from '../../../../types';
3
- declare const PresetProvider: React.Provider<EditorPlugin[]>;
4
- declare const usePresetContext: () => EditorPlugin[];
5
- export { PresetProvider, usePresetContext };
@@ -1,50 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { EditorView } from 'prosemirror-view';
4
- import { Transformer } from '@atlaskit/editor-common/types';
5
- import { EventDispatcher, Dispatch } from '../../../../event-dispatcher';
6
- import { EditorAppearanceComponentProps } from '../../../../types';
7
- import { FireAnalyticsCallback } from '../../../../plugins/analytics';
8
- import EditorActions from '../../../../actions';
9
- import { EditorProps } from '../editor-props-type';
10
- /**
11
- * Provides access to most commonly used configurations and instances of classes,
12
- * that most editor components rely on.
13
- */
14
- export type EditorSharedConfig = {
15
- editorView: EditorView;
16
- eventDispatcher: EventDispatcher;
17
- dispatch: Dispatch;
18
- transformer?: Transformer<any>;
19
- dispatchAnalyticsEvent?: FireAnalyticsCallback;
20
- primaryToolbarComponents: EditorAppearanceComponentProps['primaryToolbarComponents'];
21
- contentComponents: EditorAppearanceComponentProps['contentComponents'];
22
- popupsMountPoint: EditorProps['popupsMountPoint'];
23
- popupsBoundariesElement: EditorProps['popupsBoundariesElement'];
24
- popupsScrollableElement: EditorProps['popupsScrollableElement'];
25
- providerFactory: EditorAppearanceComponentProps['providerFactory'];
26
- editorActions: EditorActions;
27
- onChange?: EditorProps['onChange'];
28
- onDestroy?: EditorProps['onDestroy'];
29
- onMount?: EditorProps['onMount'];
30
- };
31
- export declare class EditorSharedConfigProvider extends React.Component<{
32
- value: EditorSharedConfig | null;
33
- }, any> {
34
- static childContextTypes: {
35
- editorSharedConfig: PropTypes.Requireable<object>;
36
- };
37
- getChildContext(): {
38
- editorSharedConfig: EditorSharedConfig | null;
39
- };
40
- render(): JSX.Element;
41
- }
42
- export declare class EditorSharedConfigConsumer extends React.Component<{
43
- children: (value: EditorSharedConfig | null) => React.ReactNode | null;
44
- }> {
45
- static contextTypes: {
46
- editorSharedConfig: PropTypes.Requireable<object>;
47
- };
48
- render(): JSX.Element;
49
- }
50
- export declare const useEditorSharedConfig: () => EditorSharedConfig | null;
@@ -1,29 +0,0 @@
1
- /// <reference types="react" />
2
- import { Schema } from 'prosemirror-model';
3
- import EditorActions from '../../../actions';
4
- import { Transformer } from '@atlaskit/editor-common/types';
5
- import { EditorPlugin } from '../../../types';
6
- import { FireAnalyticsCallback } from '../../../plugins/analytics';
7
- import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
8
- export type EditorProps = {
9
- plugins?: Array<EditorPlugin>;
10
- transformer?: (schema: Schema) => Transformer<any>;
11
- children?: React.ReactChild;
12
- defaultValue?: string | object;
13
- popupsMountPoint?: HTMLElement;
14
- popupsBoundariesElement?: HTMLElement;
15
- popupsScrollableElement?: HTMLElement;
16
- disabled?: boolean;
17
- placeholder?: string;
18
- onAnalyticsEvent?: FireAnalyticsCallback;
19
- onChange?: (value: any, meta: {
20
- source: 'remote' | 'local';
21
- }) => void;
22
- onSave?: (value: any) => void;
23
- onCancel?: (value: any) => void;
24
- onMount?: (actions: EditorActions) => void;
25
- onDestroy?: () => void;
26
- };
27
- export type EditorPropsExtended = EditorProps & {
28
- portalProviderAPI: PortalProviderAPI;
29
- };
@@ -1,8 +0,0 @@
1
- import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
- import { EditorSharedConfig } from '../../../internal/context/shared-config';
3
- /**
4
- * Subscribes to analytics events fired from editor components
5
- * and passes them through to `fireAnalyticsEvent`.
6
- */
7
- export declare function useAnalyticsHandler(editorSharedConfig: EditorSharedConfig | null): void;
8
- export declare function useCreateAnalyticsHandler(createAnalyticsEvent?: CreateUIAnalyticsEvent): import("@atlaskit/editor-common/analytics").FireAnalyticsCallback;
@@ -1,6 +0,0 @@
1
- import { EditorView } from 'prosemirror-view';
2
- import { Transaction } from 'prosemirror-state';
3
- import { Transformer } from '@atlaskit/editor-common/types';
4
- import { EditorSharedConfig } from '../../context/shared-config';
5
- export declare function createDispatchTransaction(editorSharedConfig: EditorSharedConfig): (transaction: Transaction) => void;
6
- export declare function getEditorValue(editorView: EditorView, transformer?: Transformer<any>): any;
@@ -1,19 +0,0 @@
1
- import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
- import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
3
- import EditorActions from '../../../../../actions';
4
- import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
5
- import { EditorSharedConfig } from '../../context/shared-config';
6
- import { EditorPropsExtended } from '../../editor-props-type';
7
- import { FeatureFlags } from '../../../../../types/feature-flags';
8
- import { IntlShape } from 'react-intl-next';
9
- export declare function createEditor({ context, onAnalyticsEvent, transformer, providerFactory, plugins, portalProviderAPI, defaultValue, ref, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, editorActions, disabled, onChange, onDestroy, onMount, featureFlags, getIntl, }: CreateEditorParams): EditorSharedConfig | null;
10
- export type CreateEditorParams = Pick<EditorPropsExtended, 'defaultValue' | 'plugins' | 'popupsMountPoint' | 'popupsBoundariesElement' | 'popupsScrollableElement' | 'onChange' | 'disabled' | 'transformer' | 'onAnalyticsEvent' | 'onDestroy' | 'onMount'> & {
11
- context: any;
12
- ref?: HTMLDivElement | null;
13
- providerFactory: ProviderFactory;
14
- portalProviderAPI: PortalProviderAPI;
15
- createAnalyticsEvent?: CreateUIAnalyticsEvent;
16
- editorActions: EditorActions;
17
- featureFlags: FeatureFlags;
18
- getIntl: () => IntlShape;
19
- };
@@ -1,11 +0,0 @@
1
- import EditorActions from '../../../../../actions';
2
- import { EditorSharedConfig } from '../../context/shared-config';
3
- import { CreateEditorParams } from './create-editor';
4
- import { FeatureFlags } from '@atlaskit/editor-common/types';
5
- export declare function useEditor(config: CreateEditorParams & {
6
- editorActions?: EditorActions;
7
- }): [EditorSharedConfig | null, (ref: HTMLDivElement | null) => void];
8
- /**
9
- * Handles editor component unmount
10
- */
11
- export declare function useHandleEditorLifecycle(editorSharedConfig: EditorSharedConfig | null, featureFlags: FeatureFlags): void;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
3
- import { EditorProps } from './internal/editor-props-type';
4
- export interface MobileEditorProps extends EditorProps {
5
- isMaxContentSizeReached?: boolean;
6
- maxHeight?: number;
7
- }
8
- export declare function MobileEditor(props: MobileEditorProps & WithAnalyticsEventsProps): JSX.Element;
9
- export declare namespace MobileEditor {
10
- var displayName: string;
11
- }
12
- export declare const Mobile: React.ForwardRefExoticComponent<Omit<MobileEditorProps & WithAnalyticsEventsProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;