@atlaskit/editor-core 187.30.9 → 187.31.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 +16 -0
- package/dist/cjs/index.js +2 -21
- package/dist/cjs/plugins/help-dialog/index.js +3 -6
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +2 -1
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +2 -1
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +11 -9
- package/dist/cjs/plugins/quick-insert/commands.js +6 -10
- package/dist/cjs/plugins/quick-insert/index.js +49 -52
- package/dist/cjs/plugins/quick-insert/search.js +17 -61
- package/dist/cjs/plugins/quick-insert/ui/ModalElementBrowser/index.js +12 -5
- package/dist/cjs/plugins/selection/gap-cursor/utils/place-gap-cursor.js +2 -1
- package/dist/cjs/plugins/selection/gap-cursor/utils.js +17 -1
- package/dist/cjs/ui/ElementBrowser/InsertMenu.js +54 -54
- package/dist/cjs/utils/index.js +0 -32
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/index.js +7 -4
- package/dist/es2019/plugins/help-dialog/index.js +3 -6
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +2 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +2 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +7 -3
- package/dist/es2019/plugins/quick-insert/commands.js +6 -9
- package/dist/es2019/plugins/quick-insert/index.js +48 -45
- package/dist/es2019/plugins/quick-insert/search.js +15 -42
- package/dist/es2019/plugins/quick-insert/ui/ModalElementBrowser/index.js +11 -4
- package/dist/es2019/plugins/selection/gap-cursor/utils/place-gap-cursor.js +3 -2
- package/dist/es2019/plugins/selection/gap-cursor/utils.js +14 -0
- package/dist/es2019/ui/ElementBrowser/InsertMenu.js +28 -25
- package/dist/es2019/utils/index.js +0 -25
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/index.js +7 -4
- package/dist/esm/plugins/help-dialog/index.js +3 -6
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +2 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +2 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +5 -3
- package/dist/esm/plugins/quick-insert/commands.js +6 -10
- package/dist/esm/plugins/quick-insert/index.js +49 -46
- package/dist/esm/plugins/quick-insert/search.js +15 -56
- package/dist/esm/plugins/quick-insert/ui/ModalElementBrowser/index.js +12 -5
- package/dist/esm/plugins/selection/gap-cursor/utils/place-gap-cursor.js +3 -2
- package/dist/esm/plugins/selection/gap-cursor/utils.js +14 -0
- package/dist/esm/ui/ElementBrowser/InsertMenu.js +54 -54
- package/dist/esm/utils/index.js +0 -31
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/index.d.ts +6 -3
- package/dist/types/labs/next/presets/default.d.ts +32 -0
- package/dist/types/plugins/expand/ui/ExpandIconButton.d.ts +1 -1
- package/dist/types/plugins/extension/ui/Extension/Extension/index.d.ts +4 -4
- package/dist/types/plugins/help-dialog/index.d.ts +5 -1
- package/dist/types/plugins/insert-block/types.d.ts +3 -1
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.d.ts +3 -0
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.d.ts +3 -0
- package/dist/types/plugins/quick-insert/commands.d.ts +2 -2
- package/dist/types/plugins/quick-insert/index.d.ts +12 -9
- package/dist/types/plugins/quick-insert/search.d.ts +3 -5
- package/dist/types/plugins/selection/gap-cursor/utils.d.ts +1 -0
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types/ui/ElementBrowser/InsertMenu.d.ts +1 -1
- package/dist/types/ui/ElementBrowser/components/StatelessElementBrowser.d.ts +1 -1
- package/dist/types/ui/ElementBrowser/types.d.ts +3 -0
- package/dist/types/utils/index.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +6 -3
- package/dist/types-ts4.5/labs/next/presets/default.d.ts +32 -0
- package/dist/types-ts4.5/plugins/expand/ui/ExpandIconButton.d.ts +1 -1
- package/dist/types-ts4.5/plugins/extension/ui/Extension/Extension/index.d.ts +4 -4
- package/dist/types-ts4.5/plugins/help-dialog/index.d.ts +3 -1
- package/dist/types-ts4.5/plugins/insert-block/types.d.ts +3 -1
- package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.d.ts +3 -0
- package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.d.ts +3 -0
- package/dist/types-ts4.5/plugins/quick-insert/commands.d.ts +2 -2
- package/dist/types-ts4.5/plugins/quick-insert/index.d.ts +12 -9
- package/dist/types-ts4.5/plugins/quick-insert/search.d.ts +3 -5
- package/dist/types-ts4.5/plugins/selection/gap-cursor/utils.d.ts +1 -0
- package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
- package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/ElementBrowser/InsertMenu.d.ts +1 -1
- package/dist/types-ts4.5/ui/ElementBrowser/components/StatelessElementBrowser.d.ts +1 -1
- package/dist/types-ts4.5/ui/ElementBrowser/types.d.ts +3 -0
- package/dist/types-ts4.5/utils/index.d.ts +0 -1
- package/package.json +3 -6
- package/report.api.md +2 -30
- package/tmp/api-report-tmp.d.ts +2 -21
- package/dist/cjs/plugins/quick-insert/api.js +0 -23
- package/dist/cjs/plugins/quick-insert/types.js +0 -5
- package/dist/es2019/plugins/quick-insert/api.js +0 -14
- package/dist/es2019/plugins/quick-insert/types.js +0 -1
- package/dist/esm/plugins/quick-insert/api.js +0 -16
- package/dist/esm/plugins/quick-insert/types.js +0 -1
- package/dist/types/plugins/quick-insert/api.d.ts +0 -6
- package/dist/types/plugins/quick-insert/types.d.ts +0 -4
- package/dist/types-ts4.5/plugins/quick-insert/api.d.ts +0 -6
- package/dist/types-ts4.5/plugins/quick-insert/types.d.ts +0 -4
|
@@ -2,6 +2,8 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
2
2
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import type { BlockMenuItem } from '../../plugins/insert-block/ui/ToolbarInsertBlock/create-items';
|
|
4
4
|
import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
5
|
+
import type { PluginInjectionAPIWithDependencies } from '@atlaskit/editor-common/types';
|
|
6
|
+
import type { InsertBlockPluginDependencies } from '../../plugins/insert-block/types';
|
|
5
7
|
type SimpleEventHandler<T> = (event?: T) => void;
|
|
6
8
|
export type Category = {
|
|
7
9
|
title: string;
|
|
@@ -21,6 +23,7 @@ export interface InsertMenuProps {
|
|
|
21
23
|
showElementBrowserLink: boolean;
|
|
22
24
|
toggleVisiblity: SimpleEventHandler<MouseEvent | KeyboardEvent>;
|
|
23
25
|
onInsert: OnInsert;
|
|
26
|
+
pluginInjectionApi: PluginInjectionAPIWithDependencies<InsertBlockPluginDependencies> | undefined;
|
|
24
27
|
}
|
|
25
28
|
export type OnInsert = ({ item }: {
|
|
26
29
|
item: MenuItem;
|
|
@@ -26,7 +26,6 @@ export declare function whichTransitionEvent<TransitionEventName extends string>
|
|
|
26
26
|
export declare const isTemporary: (id: string) => boolean;
|
|
27
27
|
export declare const hasOpenEnd: (slice: Slice) => boolean;
|
|
28
28
|
export declare const isInsideBlockQuote: (state: EditorState) => boolean;
|
|
29
|
-
export declare function dedupe<T>(list?: T[], iteratee?: (p: T) => T[keyof T] | T): T[];
|
|
30
29
|
export { isTextSelection, isElementInTableCell, isLastItemMediaGroup, nonNullable, } from '@atlaskit/editor-common/utils';
|
|
31
30
|
/** Helper type for single arg function */
|
|
32
31
|
type Func<A, B> = (a: A) => B;
|
|
@@ -44,7 +44,6 @@ export { pluginKey as datePluginKey } from './plugins/date/pm-plugins/plugin-key
|
|
|
44
44
|
export { commitStatusPicker, setStatusPickerAt, updateStatus, updateStatusWithAnalytics, removeStatus, } from './plugins/status/actions';
|
|
45
45
|
export { typeAheadPluginKey } from './plugins/type-ahead';
|
|
46
46
|
export type { TypeAheadPluginState } from './plugins/type-ahead';
|
|
47
|
-
export { pluginKey as quickInsertPluginKey, memoProcessItems as processQuickInsertItems, } from './plugins/quick-insert';
|
|
48
47
|
export type { TypeAheadItem } from '@atlaskit/editor-common/provider-factory';
|
|
49
48
|
export type {
|
|
50
49
|
/**
|
|
@@ -59,7 +58,12 @@ export { historyPluginKey } from './plugins/history';
|
|
|
59
58
|
export { INPUT_METHOD, ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, } from '@atlaskit/editor-common/analytics';
|
|
60
59
|
export type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
61
60
|
export { setKeyboardHeight, setMobilePaddingTop, setIsExpanded, } from './plugins/mobile-dimensions/commands';
|
|
62
|
-
export { setTextSelection,
|
|
61
|
+
export { setTextSelection, getNodesCount, measurements } from './utils';
|
|
62
|
+
export {
|
|
63
|
+
/**
|
|
64
|
+
* @deprecated Use dedupe from @atlaskit/editor-common/utils instead
|
|
65
|
+
*/
|
|
66
|
+
dedupe, } from '@atlaskit/editor-common/utils';
|
|
63
67
|
export { ReactEditorView, BaseReactEditorView } from './create-editor';
|
|
64
68
|
export { getDefaultPresetOptionsFromEditorProps } from './create-editor';
|
|
65
69
|
export type { Command, EditorPlugin, EditorProps, EditorInstance, CommandDispatch, } from './types';
|
|
@@ -79,4 +83,3 @@ export type { PaletteColor } from './ui/ColorPalette/Palettes/type';
|
|
|
79
83
|
export { DEFAULT_BORDER_COLOR } from './ui/ColorPalette/Palettes/common';
|
|
80
84
|
export { default as messages, statusMessages, dateMessages } from './messages';
|
|
81
85
|
export { createTypeAheadTools } from './plugins/type-ahead/api';
|
|
82
|
-
export { createQuickInsertTools } from './plugins/quick-insert/api';
|
|
@@ -287,8 +287,24 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
287
287
|
}>,
|
|
288
288
|
(config?: QuickInsertPluginOptions | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"quickInsert", {
|
|
289
289
|
pluginConfiguration: QuickInsertPluginOptions | undefined;
|
|
290
|
+
sharedState: import("@atlaskit/editor-common/types").QuickInsertSharedState | null;
|
|
291
|
+
actions: {
|
|
292
|
+
insertItem: (item: import("@atlaskit/editor-common/provider-factory").QuickInsertItem) => import("../../..").Command;
|
|
293
|
+
};
|
|
294
|
+
commands: {
|
|
295
|
+
search: import("../../../plugins/quick-insert/search").QuickInsertSearch;
|
|
296
|
+
openElementBrowserModal: import("@atlaskit/editor-common/types").EditorCommand;
|
|
297
|
+
};
|
|
290
298
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"quickInsert", {
|
|
291
299
|
pluginConfiguration: QuickInsertPluginOptions | undefined;
|
|
300
|
+
sharedState: import("@atlaskit/editor-common/types").QuickInsertSharedState | null;
|
|
301
|
+
actions: {
|
|
302
|
+
insertItem: (item: import("@atlaskit/editor-common/provider-factory").QuickInsertItem) => import("../../..").Command;
|
|
303
|
+
};
|
|
304
|
+
commands: {
|
|
305
|
+
search: import("../../../plugins/quick-insert/search").QuickInsertSearch;
|
|
306
|
+
openElementBrowserModal: import("@atlaskit/editor-common/types").EditorCommand;
|
|
307
|
+
};
|
|
292
308
|
}>,
|
|
293
309
|
(config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"width", {
|
|
294
310
|
sharedState: import("@atlaskit/editor-common/types").EditorContainerWidth | undefined;
|
|
@@ -754,8 +770,24 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
754
770
|
}>,
|
|
755
771
|
(config?: QuickInsertPluginOptions | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"quickInsert", {
|
|
756
772
|
pluginConfiguration: QuickInsertPluginOptions | undefined;
|
|
773
|
+
sharedState: import("@atlaskit/editor-common/types").QuickInsertSharedState | null;
|
|
774
|
+
actions: {
|
|
775
|
+
insertItem: (item: import("@atlaskit/editor-common/provider-factory").QuickInsertItem) => import("../../..").Command;
|
|
776
|
+
};
|
|
777
|
+
commands: {
|
|
778
|
+
search: import("../../../plugins/quick-insert/search").QuickInsertSearch;
|
|
779
|
+
openElementBrowserModal: import("@atlaskit/editor-common/types").EditorCommand;
|
|
780
|
+
};
|
|
757
781
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"quickInsert", {
|
|
758
782
|
pluginConfiguration: QuickInsertPluginOptions | undefined;
|
|
783
|
+
sharedState: import("@atlaskit/editor-common/types").QuickInsertSharedState | null;
|
|
784
|
+
actions: {
|
|
785
|
+
insertItem: (item: import("@atlaskit/editor-common/provider-factory").QuickInsertItem) => import("../../..").Command;
|
|
786
|
+
};
|
|
787
|
+
commands: {
|
|
788
|
+
search: import("../../../plugins/quick-insert/search").QuickInsertSearch;
|
|
789
|
+
openElementBrowserModal: import("@atlaskit/editor-common/types").EditorCommand;
|
|
790
|
+
};
|
|
759
791
|
}>,
|
|
760
792
|
(config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"width", {
|
|
761
793
|
sharedState: import("@atlaskit/editor-common/types").EditorContainerWidth | undefined;
|
|
@@ -15,7 +15,7 @@ export declare const withTooltip: (WrapperComponent: React.ElementType) => {
|
|
|
15
15
|
render(): jsx.JSX.Element;
|
|
16
16
|
context: any;
|
|
17
17
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<ExpandIconButtonWithLabelProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
18
|
-
forceUpdate(
|
|
18
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
19
19
|
readonly props: Readonly<ExpandIconButtonWithLabelProps> & Readonly<{
|
|
20
20
|
children?: React.ReactNode;
|
|
21
21
|
}>;
|
|
@@ -22,7 +22,7 @@ export interface Props {
|
|
|
22
22
|
* End workaround
|
|
23
23
|
*/
|
|
24
24
|
declare const _default: {
|
|
25
|
-
new (props: Readonly<Props>): {
|
|
25
|
+
new (props: Props | Readonly<Props>): {
|
|
26
26
|
overflowContainer?: HTMLElement | null | undefined;
|
|
27
27
|
container?: HTMLElement | undefined;
|
|
28
28
|
shadowObserver?: import("@atlaskit/editor-common/ui").ShadowObserver | undefined;
|
|
@@ -45,7 +45,7 @@ declare const _default: {
|
|
|
45
45
|
render(): JSX.Element;
|
|
46
46
|
context: any;
|
|
47
47
|
setState<K extends keyof import("@atlaskit/editor-common/ui").OverflowShadowState>(state: import("@atlaskit/editor-common/ui").OverflowShadowState | ((prevState: Readonly<import("@atlaskit/editor-common/ui").OverflowShadowState>, props: Readonly<Props>) => import("@atlaskit/editor-common/ui").OverflowShadowState | Pick<import("@atlaskit/editor-common/ui").OverflowShadowState, K> | null) | Pick<import("@atlaskit/editor-common/ui").OverflowShadowState, K> | null, callback?: (() => void) | undefined): void;
|
|
48
|
-
forceUpdate(
|
|
48
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
49
49
|
readonly props: Readonly<Props> & Readonly<{
|
|
50
50
|
children?: React.ReactNode;
|
|
51
51
|
}>;
|
|
@@ -63,7 +63,7 @@ declare const _default: {
|
|
|
63
63
|
componentWillUpdate?(nextProps: Readonly<Props>, nextState: Readonly<import("@atlaskit/editor-common/ui").OverflowShadowState>, nextContext: any): void;
|
|
64
64
|
UNSAFE_componentWillUpdate?(nextProps: Readonly<Props>, nextState: Readonly<import("@atlaskit/editor-common/ui").OverflowShadowState>, nextContext: any): void;
|
|
65
65
|
};
|
|
66
|
-
new (props: Props, context
|
|
66
|
+
new (props: Props, context: any): {
|
|
67
67
|
overflowContainer?: HTMLElement | null | undefined;
|
|
68
68
|
container?: HTMLElement | undefined;
|
|
69
69
|
shadowObserver?: import("@atlaskit/editor-common/ui").ShadowObserver | undefined;
|
|
@@ -86,7 +86,7 @@ declare const _default: {
|
|
|
86
86
|
render(): JSX.Element;
|
|
87
87
|
context: any;
|
|
88
88
|
setState<K_1 extends keyof import("@atlaskit/editor-common/ui").OverflowShadowState>(state: import("@atlaskit/editor-common/ui").OverflowShadowState | ((prevState: Readonly<import("@atlaskit/editor-common/ui").OverflowShadowState>, props: Readonly<Props>) => import("@atlaskit/editor-common/ui").OverflowShadowState | Pick<import("@atlaskit/editor-common/ui").OverflowShadowState, K_1> | null) | Pick<import("@atlaskit/editor-common/ui").OverflowShadowState, K_1> | null, callback?: (() => void) | undefined): void;
|
|
89
|
-
forceUpdate(
|
|
89
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
90
90
|
readonly props: Readonly<Props> & Readonly<{
|
|
91
91
|
children?: React.ReactNode;
|
|
92
92
|
}>;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
4
|
+
import type quickInsertPlugin from '../quick-insert';
|
|
4
5
|
export declare function createPlugin(dispatch: Function, imageEnabled: boolean): SafePlugin<any>;
|
|
5
6
|
declare const helpDialog: NextEditorPlugin<'helpDialog', {
|
|
6
7
|
dependencies: [
|
|
7
|
-
OptionalPlugin<typeof analyticsPlugin
|
|
8
|
+
OptionalPlugin<typeof analyticsPlugin>,
|
|
9
|
+
OptionalPlugin<typeof quickInsertPlugin>
|
|
8
10
|
];
|
|
9
11
|
pluginConfiguration: boolean;
|
|
10
12
|
}>;
|
|
@@ -7,6 +7,7 @@ import type { hyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
|
|
|
7
7
|
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
8
8
|
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
9
9
|
import type mentionsPlugin from '../mentions';
|
|
10
|
+
import type quickInsertPlugin from '../quick-insert';
|
|
10
11
|
export type InsertBlockPluginDependencies = [
|
|
11
12
|
typeof featureFlagsPlugin,
|
|
12
13
|
OptionalPlugin<typeof tablesPlugin>,
|
|
@@ -15,5 +16,6 @@ export type InsertBlockPluginDependencies = [
|
|
|
15
16
|
OptionalPlugin<typeof analyticsPlugin>,
|
|
16
17
|
OptionalPlugin<ImageUploadPlugin>,
|
|
17
18
|
OptionalPlugin<typeof mentionsPlugin>,
|
|
18
|
-
OptionalPlugin<EmojiPlugin
|
|
19
|
+
OptionalPlugin<EmojiPlugin>,
|
|
20
|
+
OptionalPlugin<typeof quickInsertPlugin>
|
|
19
21
|
];
|
|
@@ -2,6 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
import type { BlockMenuItem } from './create-items';
|
|
4
4
|
import type { OnInsert } from '../../../../ui/ElementBrowser/types';
|
|
5
|
+
import type { PluginInjectionAPIWithDependencies } from '@atlaskit/editor-common/types';
|
|
6
|
+
import type { InsertBlockPluginDependencies } from '../../types';
|
|
5
7
|
type SimpleEventHandler<T> = (event?: T) => void;
|
|
6
8
|
export interface BlockInsertElementBrowserProps {
|
|
7
9
|
disabled: boolean;
|
|
@@ -20,6 +22,7 @@ export interface BlockInsertElementBrowserProps {
|
|
|
20
22
|
onKeyDown?: React.KeyboardEventHandler;
|
|
21
23
|
onInsert: OnInsert;
|
|
22
24
|
togglePlusMenuVisibility: SimpleEventHandler<MouseEvent | KeyboardEvent>;
|
|
25
|
+
pluginInjectionApi: PluginInjectionAPIWithDependencies<InsertBlockPluginDependencies> | undefined;
|
|
23
26
|
}
|
|
24
27
|
export declare const BlockInsertElementBrowser: React.FC<BlockInsertElementBrowserProps>;
|
|
25
28
|
export {};
|
|
@@ -2,6 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
import type { OnInsert } from '../../../../ui/ElementBrowser/types';
|
|
4
4
|
import type { BlockMenuItem } from './create-items';
|
|
5
|
+
import type { PluginInjectionAPIWithDependencies } from '@atlaskit/editor-common/types';
|
|
6
|
+
import type { InsertBlockPluginDependencies } from '../../types';
|
|
5
7
|
export interface BlockInsertMenuProps {
|
|
6
8
|
disabled: boolean;
|
|
7
9
|
editorView: EditorView;
|
|
@@ -23,5 +25,6 @@ export interface BlockInsertMenuProps {
|
|
|
23
25
|
onOpenChange(attrs: any): void;
|
|
24
26
|
togglePlusMenuVisibility(): void;
|
|
25
27
|
onKeyDown?: React.KeyboardEventHandler;
|
|
28
|
+
pluginInjectionApi: PluginInjectionAPIWithDependencies<InsertBlockPluginDependencies> | undefined;
|
|
26
29
|
}
|
|
27
30
|
export declare const BlockInsertMenu: React.FC<BlockInsertMenuProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
|
|
2
|
-
import type { Command } from '
|
|
3
|
-
export declare const openElementBrowserModal:
|
|
2
|
+
import type { EditorCommand, Command } from '@atlaskit/editor-common/types';
|
|
3
|
+
export declare const openElementBrowserModal: EditorCommand;
|
|
4
4
|
export declare const closeElementBrowserModal: () => Command;
|
|
5
5
|
export declare const insertItem: (item: QuickInsertItem) => Command;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import type { IntlShape } from 'react-intl-next';
|
|
2
1
|
import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
-
import type { NextEditorPlugin } from '../../types';
|
|
4
|
-
import {
|
|
5
|
-
import type {
|
|
6
|
-
|
|
7
|
-
export type { QuickInsertHandler, QuickInsertPluginOptions };
|
|
8
|
-
export { pluginKey };
|
|
2
|
+
import type { NextEditorPlugin, Command } from '../../types';
|
|
3
|
+
import type { QuickInsertSearch } from './search';
|
|
4
|
+
import type { QuickInsertPluginOptions, QuickInsertSharedState, EditorCommand } from '@atlaskit/editor-common/types';
|
|
5
|
+
export type { QuickInsertPluginOptions };
|
|
9
6
|
declare const quickInsertPlugin: NextEditorPlugin<'quickInsert', {
|
|
10
7
|
pluginConfiguration: QuickInsertPluginOptions | undefined;
|
|
8
|
+
sharedState: QuickInsertSharedState | null;
|
|
9
|
+
actions: {
|
|
10
|
+
insertItem: (item: QuickInsertItem) => Command;
|
|
11
|
+
};
|
|
12
|
+
commands: {
|
|
13
|
+
search: QuickInsertSearch;
|
|
14
|
+
openElementBrowserModal: EditorCommand;
|
|
15
|
+
};
|
|
11
16
|
}>;
|
|
12
17
|
export default quickInsertPlugin;
|
|
13
|
-
declare const processItems: (items: Array<QuickInsertHandler | QuickInsertItem>, intl: IntlShape, extendedActions?: Record<string, Function>) => QuickInsertItem[];
|
|
14
|
-
export declare const memoProcessItems: typeof processItems;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export declare
|
|
4
|
-
export declare const searchQuickInsertItems: (quickInsertState?: QuickInsertPluginState, options?: QuickInsertPluginOptions) => (query?: string, category?: string) => QuickInsertItem[];
|
|
5
|
-
export declare const getFeaturedQuickInsertItems: ({ providedItems, lazyDefaultItems }: QuickInsertPluginState, options?: QuickInsertPluginOptions) => () => QuickInsertItem[];
|
|
1
|
+
import type { EditorCommand, QuickInsertSearchOptions } from '@atlaskit/editor-common/types';
|
|
2
|
+
export type QuickInsertSearch = (searchOptions: QuickInsertSearchOptions) => EditorCommand;
|
|
3
|
+
export declare const search: QuickInsertSearch;
|
|
@@ -5,3 +5,4 @@ export declare function getMediaNearPos(doc: PMNode, $pos: ResolvedPos, schema:
|
|
|
5
5
|
export declare const isTextBlockNearPos: (doc: PMNode, schema: Schema, $pos: ResolvedPos, dir: number) => boolean;
|
|
6
6
|
export declare function getLayoutModeFromTargetNode(node: PMNode): string;
|
|
7
7
|
export declare const isIgnoredClick: (elem: HTMLElement) => boolean;
|
|
8
|
+
export declare const getComputedStyleForLayoutMode: (dom: HTMLElement, node: PMNode | undefined | null, style: CSSStyleDeclaration) => CSSStyleDeclaration;
|
|
@@ -3,7 +3,7 @@ export declare const fullPageEditorWrapper: import("@emotion/react").SerializedS
|
|
|
3
3
|
export declare const ScrollContainer: import("react").ForwardRefExoticComponent<Pick<{
|
|
4
4
|
theme?: any;
|
|
5
5
|
featureFlags?: import("@atlaskit/editor-common/types").FeatureFlags | undefined;
|
|
6
|
-
} & import("react").HTMLProps<HTMLDivElement>, "headers" | "method" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "default" | "key" | "dir" | "color" | "content" | "height" | "width" | "type" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "placeholder" | "value" | "autoFocus" | "name" | "action" | "disabled" | "children" | "media" | "property" | "aria-hidden" | "size" | "aria-expanded" | "aria-label" | "className" | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "mediaGroup" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "useMap" | "wmode" | "wrap" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "
|
|
6
|
+
} & import("react").HTMLProps<HTMLDivElement>, "headers" | "method" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "default" | "key" | "dir" | "color" | "content" | "height" | "translate" | "width" | "type" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "placeholder" | "value" | "autoFocus" | "name" | "action" | "disabled" | "children" | "media" | "property" | "aria-hidden" | "size" | "aria-expanded" | "aria-label" | "className" | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "mediaGroup" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "useMap" | "wmode" | "wrap" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | keyof {
|
|
7
7
|
theme?: any;
|
|
8
8
|
featureFlags?: import("@atlaskit/editor-common/types").FeatureFlags | undefined;
|
|
9
9
|
}> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -8,6 +8,6 @@ type ContentStylesProps = {
|
|
|
8
8
|
featureFlags?: FeatureFlags;
|
|
9
9
|
};
|
|
10
10
|
type Props = ContentStylesProps & React.HTMLProps<HTMLDivElement>;
|
|
11
|
-
export declare const createEditorContentStyle: (styles?: SerializedStyles) => React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "default" | "key" | "dir" | "color" | "content" | "height" | "width" | "type" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "placeholder" | "value" | "autoFocus" | "name" | "action" | "disabled" | "children" | "media" | "property" | "aria-hidden" | "size" | "aria-expanded" | "aria-label" | "className" | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "mediaGroup" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "useMap" | "wmode" | "wrap" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "
|
|
12
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "default" | "key" | "dir" | "color" | "content" | "height" | "width" | "type" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "placeholder" | "value" | "autoFocus" | "name" | "action" | "disabled" | "children" | "media" | "property" | "aria-hidden" | "size" | "aria-expanded" | "aria-label" | "className" | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "mediaGroup" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "useMap" | "wmode" | "wrap" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "
|
|
11
|
+
export declare const createEditorContentStyle: (styles?: SerializedStyles) => React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "default" | "key" | "dir" | "color" | "content" | "height" | "translate" | "width" | "type" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "placeholder" | "value" | "autoFocus" | "name" | "action" | "disabled" | "children" | "media" | "property" | "aria-hidden" | "size" | "aria-expanded" | "aria-label" | "className" | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "mediaGroup" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "useMap" | "wmode" | "wrap" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | keyof ContentStylesProps> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "default" | "key" | "dir" | "color" | "content" | "height" | "translate" | "width" | "type" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "placeholder" | "value" | "autoFocus" | "name" | "action" | "disabled" | "children" | "media" | "property" | "aria-hidden" | "size" | "aria-expanded" | "aria-label" | "className" | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "mediaGroup" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "useMap" | "wmode" | "wrap" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | keyof ContentStylesProps> & React.RefAttributes<HTMLDivElement>>;
|
|
13
13
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import type { InsertMenuProps } from './types';
|
|
3
|
-
declare const InsertMenu: ({ editorView, dropdownItems, showElementBrowserLink, onInsert, toggleVisiblity, }: InsertMenuProps) => jsx.JSX.Element;
|
|
3
|
+
declare const InsertMenu: ({ editorView, dropdownItems, showElementBrowserLink, onInsert, toggleVisiblity, pluginInjectionApi, }: InsertMenuProps) => jsx.JSX.Element;
|
|
4
4
|
export default InsertMenu;
|
|
@@ -19,5 +19,5 @@ export type StatelessElementBrowserProps = {
|
|
|
19
19
|
emptyStateHandler?: EmptyStateHandler;
|
|
20
20
|
viewMoreItem?: QuickInsertItem;
|
|
21
21
|
} & WithAnalyticsEventsProps;
|
|
22
|
-
declare const MemoizedElementBrowser: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<Omit<StatelessElementBrowserProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "key" | "mode" | "analyticsContext" | "items" | "
|
|
22
|
+
declare const MemoizedElementBrowser: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<Omit<StatelessElementBrowserProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "key" | "mode" | "analyticsContext" | "items" | "emptyStateHandler" | "selectedCategory" | "searchTerm" | "onInsertItem" | "categories" | "onSelectCategory" | "onSearch" | "onSelectItem" | "viewMoreItem" | "showCategories" | "showSearch"> & React.RefAttributes<any>>>;
|
|
23
23
|
export default MemoizedElementBrowser;
|
|
@@ -2,6 +2,8 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
2
2
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import type { BlockMenuItem } from '../../plugins/insert-block/ui/ToolbarInsertBlock/create-items';
|
|
4
4
|
import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
5
|
+
import type { PluginInjectionAPIWithDependencies } from '@atlaskit/editor-common/types';
|
|
6
|
+
import type { InsertBlockPluginDependencies } from '../../plugins/insert-block/types';
|
|
5
7
|
type SimpleEventHandler<T> = (event?: T) => void;
|
|
6
8
|
export type Category = {
|
|
7
9
|
title: string;
|
|
@@ -21,6 +23,7 @@ export interface InsertMenuProps {
|
|
|
21
23
|
showElementBrowserLink: boolean;
|
|
22
24
|
toggleVisiblity: SimpleEventHandler<MouseEvent | KeyboardEvent>;
|
|
23
25
|
onInsert: OnInsert;
|
|
26
|
+
pluginInjectionApi: PluginInjectionAPIWithDependencies<InsertBlockPluginDependencies> | undefined;
|
|
24
27
|
}
|
|
25
28
|
export type OnInsert = ({ item }: {
|
|
26
29
|
item: MenuItem;
|
|
@@ -26,7 +26,6 @@ export declare function whichTransitionEvent<TransitionEventName extends string>
|
|
|
26
26
|
export declare const isTemporary: (id: string) => boolean;
|
|
27
27
|
export declare const hasOpenEnd: (slice: Slice) => boolean;
|
|
28
28
|
export declare const isInsideBlockQuote: (state: EditorState) => boolean;
|
|
29
|
-
export declare function dedupe<T>(list?: T[], iteratee?: (p: T) => T[keyof T] | T): T[];
|
|
30
29
|
export { isTextSelection, isElementInTableCell, isLastItemMediaGroup, nonNullable, } from '@atlaskit/editor-common/utils';
|
|
31
30
|
/** Helper type for single arg function */
|
|
32
31
|
type Func<A, B> = (a: A) => B;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "187.
|
|
3
|
+
"version": "187.31.0",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@atlaskit/code": "^14.6.0",
|
|
56
56
|
"@atlaskit/date": "^0.10.0",
|
|
57
57
|
"@atlaskit/datetime-picker": "^12.7.0",
|
|
58
|
-
"@atlaskit/editor-common": "^74.
|
|
58
|
+
"@atlaskit/editor-common": "^74.52.0",
|
|
59
59
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|
|
60
60
|
"@atlaskit/editor-markdown-transformer": "^5.2.5",
|
|
61
61
|
"@atlaskit/editor-palette": "1.5.1",
|
|
@@ -124,7 +124,6 @@
|
|
|
124
124
|
"classnames": "^2.2.5",
|
|
125
125
|
"clipboard-polyfill": "2.4.3",
|
|
126
126
|
"date-fns": "^2.17.0",
|
|
127
|
-
"fuse.js": "^6.6.2",
|
|
128
127
|
"is-number": "^7.0.0",
|
|
129
128
|
"lodash": "^4.17.21",
|
|
130
129
|
"memoize-one": "^6.0.0",
|
|
@@ -144,14 +143,12 @@
|
|
|
144
143
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
145
144
|
},
|
|
146
145
|
"devDependencies": {
|
|
147
|
-
"@af/editor-libra": "*",
|
|
148
146
|
"@af/integration-testing": "*",
|
|
149
147
|
"@atlaskit/code": "^14.6.0",
|
|
150
148
|
"@atlaskit/collab-provider": "9.11.1",
|
|
151
149
|
"@atlaskit/dropdown-menu": "^11.11.0",
|
|
152
150
|
"@atlaskit/editor-extension-dropbox": "^0.4.0",
|
|
153
151
|
"@atlaskit/editor-plugin-table": "^2.10.0",
|
|
154
|
-
"@atlaskit/editor-test-helpers": "^18.11.0",
|
|
155
152
|
"@atlaskit/flag": "^15.2.0",
|
|
156
153
|
"@atlaskit/icon-object": "^6.3.0",
|
|
157
154
|
"@atlaskit/inline-dialog": "^13.6.0",
|
|
@@ -271,4 +268,4 @@
|
|
|
271
268
|
"type": "boolean"
|
|
272
269
|
}
|
|
273
270
|
}
|
|
274
|
-
}
|
|
271
|
+
}
|
package/report.api.md
CHANGED
|
@@ -45,6 +45,7 @@ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
|
45
45
|
import { darkModeStatusColorPalette } from '@atlaskit/editor-common/ui-color';
|
|
46
46
|
import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
47
47
|
import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
48
|
+
import { dedupe } from '@atlaskit/editor-common/utils';
|
|
48
49
|
import { DEFAULT_BORDER_COLOR } from '@atlaskit/editor-common/ui-color';
|
|
49
50
|
import type { DirectEditorProps } from '@atlaskit/editor-prosemirror/view';
|
|
50
51
|
import { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
@@ -87,7 +88,6 @@ import type { HyperlinkPluginOptions } from '@atlaskit/editor-common/types';
|
|
|
87
88
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
88
89
|
import type { InputMethodInsertMedia } from '@atlaskit/editor-common/analytics';
|
|
89
90
|
import { InputTracking } from '@atlaskit/editor-common/types';
|
|
90
|
-
import type { IntlShape } from 'react-intl-next';
|
|
91
91
|
import { JSONDocNode } from '@atlaskit/editor-json-transformer/types';
|
|
92
92
|
import { jsx } from '@emotion/react';
|
|
93
93
|
import { lightModeStatusColorPalette } from '@atlaskit/editor-common/ui-color';
|
|
@@ -132,7 +132,6 @@ import type { PublicPluginAPI } from '@atlaskit/editor-common/types';
|
|
|
132
132
|
import { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
|
|
133
133
|
import type { QuickInsertOptions } from '@atlaskit/editor-common/types';
|
|
134
134
|
import type { QuickInsertPluginOptions } from '@atlaskit/editor-common/types';
|
|
135
|
-
import type { QuickInsertPluginState } from '@atlaskit/editor-common/types';
|
|
136
135
|
import { QuickInsertProvider } from '@atlaskit/editor-common/provider-factory';
|
|
137
136
|
import { default as React_2 } from 'react';
|
|
138
137
|
import type { ReactElement } from 'react';
|
|
@@ -395,14 +394,6 @@ interface CreateEditorStateOptions {
|
|
|
395
394
|
selectionAtStart?: boolean;
|
|
396
395
|
}
|
|
397
396
|
|
|
398
|
-
// @public (undocumented)
|
|
399
|
-
export const createQuickInsertTools: (editorView: EditorView) => {
|
|
400
|
-
getItems: (
|
|
401
|
-
query: string,
|
|
402
|
-
options?: QuickInsertPluginOptions,
|
|
403
|
-
) => QuickInsertItem[];
|
|
404
|
-
};
|
|
405
|
-
|
|
406
397
|
export { createTable };
|
|
407
398
|
|
|
408
399
|
// @public (undocumented)
|
|
@@ -519,8 +510,7 @@ type DateType = {
|
|
|
519
510
|
day?: number;
|
|
520
511
|
};
|
|
521
512
|
|
|
522
|
-
|
|
523
|
-
export function dedupe<T>(list?: T[], iteratee?: (p: T) => T | T[keyof T]): T[];
|
|
513
|
+
export { dedupe };
|
|
524
514
|
|
|
525
515
|
export { DEFAULT_BORDER_COLOR };
|
|
526
516
|
|
|
@@ -1658,16 +1648,6 @@ type PrimaryToolbarComponents =
|
|
|
1658
1648
|
| BeforeAndAfterToolbarComponents
|
|
1659
1649
|
| ReactComponents;
|
|
1660
1650
|
|
|
1661
|
-
// @public (undocumented)
|
|
1662
|
-
const processItems: (
|
|
1663
|
-
items: Array<QuickInsertHandler | QuickInsertItem>,
|
|
1664
|
-
intl: IntlShape,
|
|
1665
|
-
extendedActions?: Record<string, Function>,
|
|
1666
|
-
) => QuickInsertItem[];
|
|
1667
|
-
|
|
1668
|
-
// @public (undocumented)
|
|
1669
|
-
export const processQuickInsertItems: typeof processItems;
|
|
1670
|
-
|
|
1671
1651
|
// @public (undocumented)
|
|
1672
1652
|
interface Props {
|
|
1673
1653
|
// (undocumented)
|
|
@@ -1723,16 +1703,8 @@ type Props_5 = {
|
|
|
1723
1703
|
// @public (undocumented)
|
|
1724
1704
|
type ProsemirrorGetPosHandler = () => number | undefined;
|
|
1725
1705
|
|
|
1726
|
-
// @public (undocumented)
|
|
1727
|
-
type QuickInsertHandler =
|
|
1728
|
-
| ((intl: IntlShape) => Array<QuickInsertItem>)
|
|
1729
|
-
| Array<QuickInsertItem>;
|
|
1730
|
-
|
|
1731
1706
|
export { QuickInsertItem };
|
|
1732
1707
|
|
|
1733
|
-
// @public (undocumented)
|
|
1734
|
-
export const quickInsertPluginKey: PluginKey<QuickInsertPluginState>;
|
|
1735
|
-
|
|
1736
1708
|
export { QuickInsertProvider };
|
|
1737
1709
|
|
|
1738
1710
|
// @public (undocumented)
|