@atlaskit/editor-core 207.2.1 → 207.4.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 +33 -0
- package/dist/cjs/presets/default.js +8 -0
- package/dist/cjs/ui/Appearance/Chromeless.js +27 -11
- package/dist/cjs/ui/Appearance/Comment/Comment.js +25 -5
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +26 -4
- package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/cjs/ui/ContentStyles/layout.js +2 -2
- package/dist/cjs/ui/ContextPanel/index.js +10 -4
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +5 -3
- package/dist/cjs/ui/EditorContentContainer/styles/annotationStyles.js +45 -0
- package/dist/cjs/ui/EditorContentContainer/styles/embedCardStyles.js +34 -0
- package/dist/cjs/ui/EditorContentContainer/styles/mediaStyles.js +230 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/presets/default.js +8 -0
- package/dist/es2019/ui/Appearance/Chromeless.js +28 -10
- package/dist/es2019/ui/Appearance/Comment/Comment.js +24 -3
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +24 -2
- package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/es2019/ui/ContentStyles/layout.js +3 -2
- package/dist/es2019/ui/ContextPanel/index.js +11 -5
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +8 -7
- package/dist/es2019/ui/EditorContentContainer/styles/annotationStyles.js +47 -0
- package/dist/es2019/ui/EditorContentContainer/styles/embedCardStyles.js +27 -0
- package/dist/es2019/ui/EditorContentContainer/styles/mediaStyles.js +357 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/presets/default.js +8 -0
- package/dist/esm/ui/Appearance/Chromeless.js +28 -12
- package/dist/esm/ui/Appearance/Comment/Comment.js +26 -6
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +27 -5
- package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/esm/ui/ContentStyles/layout.js +2 -2
- package/dist/esm/ui/ContextPanel/index.js +11 -5
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +6 -4
- package/dist/esm/ui/EditorContentContainer/styles/annotationStyles.js +37 -0
- package/dist/esm/ui/EditorContentContainer/styles/embedCardStyles.js +27 -0
- package/dist/esm/ui/EditorContentContainer/styles/mediaStyles.js +224 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/presets/default.d.ts +14 -4
- package/dist/types/types/editor-props.d.ts +11 -10
- package/dist/types/ui/Appearance/Chromeless.d.ts +0 -4
- package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +1 -1
- package/dist/types/ui/Appearance/FullPage/getEditorViewModeSync.d.ts +1 -1
- package/dist/types/ui/EditorContentContainer/styles/annotationStyles.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/embedCardStyles.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/mediaStyles.d.ts +1 -0
- package/dist/types-ts4.5/presets/default.d.ts +14 -4
- package/dist/types-ts4.5/types/editor-props.d.ts +11 -10
- package/dist/types-ts4.5/ui/Appearance/Chromeless.d.ts +0 -4
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPage.d.ts +1 -1
- package/dist/types-ts4.5/ui/Appearance/FullPage/getEditorViewModeSync.d.ts +1 -1
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/annotationStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/embedCardStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/mediaStyles.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
|
|
2
2
|
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import type { SelectionPluginOptions } from '@atlaskit/editor-common/selection';
|
|
4
|
-
import type { EditorAppearance, FeatureFlags,
|
|
4
|
+
import type { EditorAppearance, FeatureFlags, PerformanceTracking } from '@atlaskit/editor-common/types';
|
|
5
5
|
import type { BasePluginOptions } from '@atlaskit/editor-plugins/base';
|
|
6
6
|
import type { BlockTypePluginOptions } from '@atlaskit/editor-plugins/block-type';
|
|
7
|
-
import type {
|
|
7
|
+
import type { CodeBlockPluginOptions } from '@atlaskit/editor-plugins/code-block';
|
|
8
|
+
import { type HyperlinkPluginOptions } from '@atlaskit/editor-plugins/hyperlink';
|
|
8
9
|
import type { PastePluginOptions } from '@atlaskit/editor-plugins/paste';
|
|
9
10
|
import type { PlaceholderPluginOptions } from '@atlaskit/editor-plugins/placeholder';
|
|
11
|
+
import type { QuickInsertPluginOptions } from '@atlaskit/editor-plugins/quick-insert';
|
|
12
|
+
import type { TextFormattingPluginOptions } from '@atlaskit/editor-plugins/text-formatting';
|
|
10
13
|
import type { TypeAheadPluginOptions } from '@atlaskit/editor-plugins/type-ahead';
|
|
11
14
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
12
15
|
import type { DefaultPresetBuilder } from './default-preset-type';
|
|
@@ -15,10 +18,10 @@ export type DefaultPresetPluginOptions = {
|
|
|
15
18
|
base?: BasePluginOptions;
|
|
16
19
|
blockType?: BlockTypePluginOptions;
|
|
17
20
|
placeholder?: PlaceholderPluginOptions;
|
|
18
|
-
textFormatting?:
|
|
21
|
+
textFormatting?: TextFormattingPluginOptions;
|
|
19
22
|
submitEditor?: (editorView: EditorView) => void;
|
|
20
23
|
quickInsert?: QuickInsertPluginOptions;
|
|
21
|
-
codeBlock?:
|
|
24
|
+
codeBlock?: CodeBlockPluginOptions;
|
|
22
25
|
selection?: SelectionPluginOptions;
|
|
23
26
|
hyperlinkOptions?: HyperlinkPluginOptions;
|
|
24
27
|
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
@@ -44,6 +47,13 @@ export type DefaultPresetPluginOptions = {
|
|
|
44
47
|
/**
|
|
45
48
|
* Note: The order that presets are added determines
|
|
46
49
|
* their placement in the editor toolbar
|
|
50
|
+
* @param options
|
|
51
|
+
* @example
|
|
47
52
|
*/
|
|
48
53
|
export declare function createDefaultPreset(options: DefaultPresetPluginOptions): DefaultPresetBuilder;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @param props
|
|
57
|
+
* @example
|
|
58
|
+
*/
|
|
49
59
|
export declare function useDefaultPreset(props: DefaultPresetPluginOptions): DefaultPresetBuilder[];
|
|
@@ -6,21 +6,22 @@ import type { ErrorReportingHandler } from '@atlaskit/editor-common/error-report
|
|
|
6
6
|
import type { ExtensionHandlers, ExtensionProvider } from '@atlaskit/editor-common/extensions';
|
|
7
7
|
import type { AllEditorPresetPluginTypes, AllPluginNames, EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
8
8
|
import type { ContextIdentifierProvider, Providers, SearchProvider } from '@atlaskit/editor-common/provider-factory';
|
|
9
|
-
import type { EditorAppearance, EmptyStateHandler, FeedbackInfo, LinkingOptions, PerformanceTracking, QuickInsertOptions,
|
|
9
|
+
import type { EditorAppearance, EmptyStateHandler, FeedbackInfo, LinkingOptions, PerformanceTracking, QuickInsertOptions, Transformer } from '@atlaskit/editor-common/types';
|
|
10
10
|
import type { UseStickyToolbarType } from '@atlaskit/editor-common/ui';
|
|
11
11
|
import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
12
12
|
import type { AnnotationProviders } from '@atlaskit/editor-plugins/annotation';
|
|
13
13
|
import type { BlockTypePluginOptions } from '@atlaskit/editor-plugins/block-type';
|
|
14
|
-
import type {
|
|
14
|
+
import type { CodeBlockPluginOptions } from '@atlaskit/editor-plugins/code-block';
|
|
15
15
|
import type { DatePluginOptions } from '@atlaskit/editor-plugins/date';
|
|
16
16
|
import type { FindReplaceOptions } from '@atlaskit/editor-plugins/find-replace';
|
|
17
17
|
import type { LayoutPluginOptions } from '@atlaskit/editor-plugins/layout';
|
|
18
|
-
import type {
|
|
18
|
+
import type { MediaPluginOptions, MediaState } from '@atlaskit/editor-plugins/media/types';
|
|
19
19
|
import type { MentionPluginConfig } from '@atlaskit/editor-plugins/mentions';
|
|
20
20
|
import type { PanelPluginConfig } from '@atlaskit/editor-plugins/panel';
|
|
21
|
-
import type {
|
|
21
|
+
import type { PlaceholderTextPluginOptions } from '@atlaskit/editor-plugins/placeholder-text';
|
|
22
22
|
import type { PluginConfig as TablesPluginConfig } from '@atlaskit/editor-plugins/table/types';
|
|
23
23
|
import type { TextColorPluginConfig } from '@atlaskit/editor-plugins/text-color';
|
|
24
|
+
import type { TextFormattingPluginOptions } from '@atlaskit/editor-plugins/text-formatting';
|
|
24
25
|
import type { Node, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
25
26
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
26
27
|
import type { MentionProvider } from '@atlaskit/mention/resource';
|
|
@@ -160,7 +161,7 @@ export interface EditorNextProps extends EditorBaseProps, EditorSharedPropsWithP
|
|
|
160
161
|
* Example:
|
|
161
162
|
* ```ts
|
|
162
163
|
* // In preset creation you can pass the props passed to the editor like this:
|
|
163
|
-
* preset.add([mediaPlugin,
|
|
164
|
+
* preset.add([mediaPlugin, MediaPluginOptions])
|
|
164
165
|
* ```
|
|
165
166
|
*
|
|
166
167
|
* Note: Props you pass to the media plugin via the preset do not re-render like in React.
|
|
@@ -173,7 +174,7 @@ export interface EditorNextProps extends EditorBaseProps, EditorSharedPropsWithP
|
|
|
173
174
|
* editorApi?.media.actions.setProvider(mediaProvider);
|
|
174
175
|
* ```
|
|
175
176
|
*/
|
|
176
|
-
media?:
|
|
177
|
+
media?: MediaPluginOptions;
|
|
177
178
|
assistiveDescribedBy?: string;
|
|
178
179
|
emojiProvider?: Providers['emojiProvider'];
|
|
179
180
|
taskDecisionProvider?: Promise<TaskDecisionProvider>;
|
|
@@ -207,7 +208,7 @@ export interface EditorPluginFeatureProps {
|
|
|
207
208
|
allowPanel?: boolean | PanelPluginConfig;
|
|
208
209
|
allowExtension?: boolean | ExtensionConfig;
|
|
209
210
|
allowConfluenceInlineComment?: boolean;
|
|
210
|
-
allowTemplatePlaceholders?: boolean |
|
|
211
|
+
allowTemplatePlaceholders?: boolean | PlaceholderTextPluginOptions;
|
|
211
212
|
allowDate?: boolean | DatePluginOptions;
|
|
212
213
|
allowLayouts?: boolean | LayoutPluginOptions;
|
|
213
214
|
allowStatus?: boolean | {
|
|
@@ -259,14 +260,14 @@ export interface EditorPluginFeatureProps {
|
|
|
259
260
|
/** @deprecated Use linking.smartLinks prop instead. */
|
|
260
261
|
smartLinks?: CardOptions;
|
|
261
262
|
allowAnalyticsGASV3?: boolean;
|
|
262
|
-
codeBlock?:
|
|
263
|
-
textFormatting?:
|
|
263
|
+
codeBlock?: CodeBlockPluginOptions;
|
|
264
|
+
textFormatting?: TextFormattingPluginOptions;
|
|
264
265
|
placeholder?: string;
|
|
265
266
|
placeholderBracketHint?: string;
|
|
266
267
|
/**
|
|
267
268
|
* Configure and extend editor linking behaviour
|
|
268
269
|
*/
|
|
269
270
|
linking?: LinkingOptions;
|
|
270
|
-
media?:
|
|
271
|
+
media?: MediaPluginOptions;
|
|
271
272
|
}
|
|
272
273
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { EditorViewModePlugin } from '@atlaskit/editor-plugins/editor-viewmode';
|
|
4
|
-
import {
|
|
4
|
+
import type { InteractionPlugin } from '@atlaskit/editor-plugins/interaction';
|
|
5
5
|
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugins/primary-toolbar';
|
|
6
6
|
import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugins/selection-toolbar';
|
|
7
7
|
import type { EditorAppearanceComponentProps } from '../../../types';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ViewMode, EditorViewModePluginState } from '@atlaskit/editor-plugins/editor-viewmode';
|
|
2
2
|
import type { ComponentProps } from './FullPage';
|
|
3
|
-
export declare const getEditorViewMode: (editorViewModeState: EditorViewModePluginState | undefined | null, preset: ComponentProps['preset']) => ViewMode;
|
|
3
|
+
export declare const getEditorViewMode: (editorViewModeState: Pick<EditorViewModePluginState, 'mode'> | undefined | null, preset: ComponentProps['preset']) => ViewMode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const annotationStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const embedCardStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const mediaStyles: import("@emotion/react").SerializedStyles;
|