@atlaskit/editor-core 191.6.0 → 191.7.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.
- package/CHANGELOG.md +21 -0
- package/afm-cc/tsconfig.json +1 -211
- package/dist/cjs/composable-editor/editor-internal.js +4 -0
- package/dist/cjs/composable-editor/editor.js +2 -2
- package/dist/cjs/composable-editor/hooks/useProviders.js +57 -0
- package/dist/cjs/labs-next.js +1 -1
- package/dist/cjs/presets/default.js +35 -32
- package/dist/cjs/presets/universal.js +70 -70
- package/dist/cjs/test-utils.js +2 -2
- package/dist/cjs/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/cjs/ui/Appearance/FullPage/BeforeWrapper.js +1 -1
- package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/cjs/ui/ContentStyles/expand.js +1 -1
- package/dist/cjs/ui/ContentStyles/index.js +5 -5
- package/dist/cjs/ui/ContentStyles/layout.js +2 -2
- package/dist/cjs/ui/ToolbarFeedback/index.js +6 -7
- package/dist/cjs/ui/WithHelpTrigger/index.js +2 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/composable-editor/editor-internal.js +4 -0
- package/dist/es2019/composable-editor/editor.js +1 -1
- package/dist/es2019/composable-editor/hooks/useProviders.js +28 -0
- package/dist/es2019/index.js +2 -2
- package/dist/es2019/labs-next.js +1 -1
- package/dist/es2019/presets/default.js +32 -29
- package/dist/es2019/presets/universal.js +45 -45
- package/dist/es2019/test-utils.js +1 -1
- package/dist/es2019/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/es2019/ui/ContentStyles/expand.js +2 -2
- package/dist/es2019/ui/ContentStyles/index.js +5 -5
- package/dist/es2019/ui/ContentStyles/layout.js +2 -2
- package/dist/es2019/ui/ToolbarFeedback/index.js +2 -3
- package/dist/es2019/ui/WithHelpTrigger/index.js +1 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/composable-editor/editor-internal.js +4 -0
- package/dist/esm/composable-editor/editor.js +1 -1
- package/dist/esm/composable-editor/hooks/useProviders.js +50 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/labs-next.js +1 -1
- package/dist/esm/presets/default.js +32 -29
- package/dist/esm/presets/universal.js +45 -45
- package/dist/esm/test-utils.js +1 -1
- package/dist/esm/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/BeforeWrapper.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/esm/ui/ContentStyles/expand.js +2 -2
- package/dist/esm/ui/ContentStyles/index.js +5 -5
- package/dist/esm/ui/ContentStyles/layout.js +2 -2
- package/dist/esm/ui/ToolbarFeedback/index.js +6 -7
- package/dist/esm/ui/WithHelpTrigger/index.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/composable-editor/hooks/useProviders.d.ts +14 -0
- package/dist/types/create-editor/create-plugins-list.d.ts +3 -4
- package/dist/types/create-editor/create-preset.d.ts +235 -63
- package/dist/types/index.d.ts +4 -4
- package/dist/types/labs-next.d.ts +1 -1
- package/dist/types/presets/default.d.ts +908 -758
- package/dist/types/presets/universal.d.ts +433 -262
- package/dist/types/presets/useUniversalPreset.d.ts +235 -63
- package/dist/types/types/editor-props.d.ts +12 -12
- package/dist/types/ui/ContextPanel/index.d.ts +1 -1
- package/dist/types/utils/action.d.ts +2 -2
- package/dist/types-ts4.5/composable-editor/hooks/useProviders.d.ts +14 -0
- package/dist/types-ts4.5/create-editor/create-plugins-list.d.ts +3 -4
- package/dist/types-ts4.5/create-editor/create-preset.d.ts +255 -56
- package/dist/types-ts4.5/index.d.ts +4 -4
- package/dist/types-ts4.5/labs-next.d.ts +1 -1
- package/dist/types-ts4.5/presets/default.d.ts +930 -756
- package/dist/types-ts4.5/presets/universal.d.ts +453 -255
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +255 -56
- package/dist/types-ts4.5/types/editor-props.d.ts +12 -12
- package/dist/types-ts4.5/ui/ContextPanel/index.d.ts +1 -1
- package/dist/types-ts4.5/utils/action.d.ts +2 -2
- package/docs/0-intro.tsx +5 -5
- package/package.json +17 -150
- package/tsconfig.json +196 -166
- package/dist/cjs/presets/types.js +0 -5
- package/dist/es2019/presets/types.js +0 -1
- package/dist/esm/presets/types.js +0 -1
- package/dist/types/presets/types.d.ts +0 -6
- package/dist/types-ts4.5/presets/types.d.ts +0 -6
|
@@ -9,18 +9,18 @@ import type { AllEditorPresetPluginTypes, FeedbackInfo, LinkingOptions, QuickIns
|
|
|
9
9
|
import type { UseStickyToolbarType } from '@atlaskit/editor-common/ui';
|
|
10
10
|
import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
11
11
|
import type { ErrorReportingHandler } from '@atlaskit/editor-common/utils';
|
|
12
|
-
import type { AnnotationProviders } from '@atlaskit/editor-
|
|
13
|
-
import type { BlockTypePluginOptions } from '@atlaskit/editor-
|
|
14
|
-
import type { CodeBlockOptions } from '@atlaskit/editor-
|
|
15
|
-
import type { DatePluginConfig } from '@atlaskit/editor-
|
|
16
|
-
import type { FindReplaceOptions } from '@atlaskit/editor-
|
|
17
|
-
import type { LayoutPluginOptions } from '@atlaskit/editor-
|
|
18
|
-
import type { MediaOptions, MediaState } from '@atlaskit/editor-
|
|
19
|
-
import type { MentionPluginConfig } from '@atlaskit/editor-
|
|
20
|
-
import type { PanelPluginConfig } from '@atlaskit/editor-
|
|
21
|
-
import type { PlaceholderTextOptions } from '@atlaskit/editor-
|
|
22
|
-
import type { PluginConfig as TablesPluginConfig } from '@atlaskit/editor-
|
|
23
|
-
import type { TextColorPluginConfig } from '@atlaskit/editor-
|
|
12
|
+
import type { AnnotationProviders } from '@atlaskit/editor-plugins/annotation';
|
|
13
|
+
import type { BlockTypePluginOptions } from '@atlaskit/editor-plugins/block-type';
|
|
14
|
+
import type { CodeBlockOptions } from '@atlaskit/editor-plugins/code-block';
|
|
15
|
+
import type { DatePluginConfig } from '@atlaskit/editor-plugins/date';
|
|
16
|
+
import type { FindReplaceOptions } from '@atlaskit/editor-plugins/find-replace';
|
|
17
|
+
import type { LayoutPluginOptions } from '@atlaskit/editor-plugins/layout';
|
|
18
|
+
import type { MediaOptions, MediaState } from '@atlaskit/editor-plugins/media/types';
|
|
19
|
+
import type { MentionPluginConfig } from '@atlaskit/editor-plugins/mentions';
|
|
20
|
+
import type { PanelPluginConfig } from '@atlaskit/editor-plugins/panel';
|
|
21
|
+
import type { PlaceholderTextOptions } from '@atlaskit/editor-plugins/placeholder-text';
|
|
22
|
+
import type { PluginConfig as TablesPluginConfig } from '@atlaskit/editor-plugins/table/types';
|
|
23
|
+
import type { TextColorPluginConfig } from '@atlaskit/editor-plugins/text-color';
|
|
24
24
|
import type { Node, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
25
25
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
26
26
|
import type { MentionProvider } from '@atlaskit/mention/resource';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import type { BreakoutMarkAttrs } from '@atlaskit/adf-schema';
|
|
5
|
-
import type { WidthPluginState } from '@atlaskit/editor-
|
|
5
|
+
import type { WidthPluginState } from '@atlaskit/editor-plugins/width';
|
|
6
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
export type Props = {
|
|
8
8
|
visible: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { OptionalPlugin, PublicPluginAPI } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { ContextPanelPlugin } from '@atlaskit/editor-
|
|
3
|
-
import type { ExtensionPlugin } from '@atlaskit/editor-
|
|
2
|
+
import type { ContextPanelPlugin } from '@atlaskit/editor-plugins/context-panel';
|
|
3
|
+
import type { ExtensionPlugin } from '@atlaskit/editor-plugins/extension';
|
|
4
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
export declare function __temporaryFixForConfigPanel(editorView: EditorView, api: PublicPluginAPI<[
|
|
6
6
|
OptionalPlugin<ExtensionPlugin>,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
2
|
+
interface UseProvidersProps {
|
|
3
|
+
contextIdentifierProvider: Promise<ContextIdentifierProvider> | undefined;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* This hook is used to replace the old approach of using the `providerFactory`.
|
|
7
|
+
*
|
|
8
|
+
* Because plugins can't update their initial configuration, this hook listens to changes
|
|
9
|
+
* and calls a command to push the update to the plugins shared state.
|
|
10
|
+
*
|
|
11
|
+
* In the future ideally consumers implement this behaviour themselves.
|
|
12
|
+
*/
|
|
13
|
+
export declare const useProviders: ({ contextIdentifierProvider, }: UseProvidersProps) => void;
|
|
14
|
+
export {};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
import type { EditorPluginInjectionAPI, EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
3
|
-
import type { ScrollGutterPluginOptions } from '@atlaskit/editor-
|
|
4
|
-
import type { DefaultPresetPluginOptions } from '
|
|
5
|
-
import type { EditorPresetProps } from '../presets/types';
|
|
3
|
+
import type { ScrollGutterPluginOptions } from '@atlaskit/editor-plugins/base';
|
|
4
|
+
import type { DefaultPresetPluginOptions } from '../../src/presets/default';
|
|
6
5
|
import type { EditorPlugin, EditorProps } from '../types';
|
|
7
6
|
import type { EditorPluginFeatureProps } from '../types/editor-props';
|
|
8
7
|
export declare function getScrollGutterOptions(props: EditorProps): ScrollGutterPluginOptions | undefined;
|
|
9
|
-
export declare function getDefaultPresetOptionsFromEditorProps(props: EditorProps, createAnalyticsEvent?: CreateUIAnalyticsEvent):
|
|
8
|
+
export declare function getDefaultPresetOptionsFromEditorProps(props: EditorProps, createAnalyticsEvent?: CreateUIAnalyticsEvent): DefaultPresetPluginOptions & EditorPluginFeatureProps;
|
|
10
9
|
/**
|
|
11
10
|
* Maps EditorProps to EditorPlugins
|
|
12
11
|
*
|