@atlaskit/editor-core 185.2.0 → 185.2.5
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 +14 -0
- package/dist/cjs/actions/index.js +2 -2
- package/dist/cjs/create-editor/ReactEditorViewInternal.js +1 -2
- package/dist/cjs/index.js +0 -6
- package/dist/cjs/labs/next/internal/hooks/use-editor/create-editor.js +1 -1
- package/dist/cjs/messages.js +6 -56
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +2 -2
- package/dist/cjs/plugins/base/pm-plugins/scroll-gutter.js +1 -1
- package/dist/cjs/plugins/card/nodeviews/blockCard.js +2 -2
- package/dist/cjs/plugins/card/nodeviews/embedCard.js +6 -6
- package/dist/cjs/plugins/card/nodeviews/genericCard.js +2 -1
- package/dist/cjs/plugins/card/pm-plugins/doc.js +9 -11
- package/dist/cjs/plugins/card/pm-plugins/keymap.js +3 -6
- package/dist/cjs/plugins/card/pm-plugins/main.js +2 -2
- package/dist/cjs/plugins/card/toolbar.js +13 -16
- package/dist/cjs/plugins/card/ui/EditLinkToolbar.js +19 -18
- package/dist/cjs/plugins/card/ui/ResizableEmbedCard.js +7 -10
- package/dist/cjs/plugins/card/utils.js +3 -4
- package/dist/cjs/plugins/clear-marks-on-change-to-empty-document/index.js +1 -1
- package/dist/cjs/plugins/custom-autoformat/doc.js +1 -1
- package/dist/cjs/plugins/date/pm-plugins/main.js +2 -2
- package/dist/cjs/plugins/emoji/index.js +2 -2
- package/dist/cjs/plugins/floating-toolbar/index.js +8 -2
- package/dist/cjs/plugins/hyperlink/Toolbar.js +8 -8
- package/dist/cjs/plugins/hyperlink/commands.js +2 -3
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +2 -2
- package/dist/cjs/plugins/layout/actions.js +1 -1
- package/dist/cjs/plugins/media/nodeviews/mediaNodeUpdater.js +1 -1
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +2 -3
- package/dist/cjs/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +1 -2
- package/dist/cjs/plugins/media/toolbar/index.js +10 -9
- package/dist/cjs/plugins/media/toolbar/linking-toolbar-appearance.js +4 -3
- package/dist/cjs/plugins/media/toolbar/linking.js +6 -6
- package/dist/cjs/plugins/media/ui/MediaLinkingToolbar.js +1 -1
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +6 -8
- package/dist/cjs/plugins/media/utils/media-files.js +8 -7
- package/dist/cjs/plugins/mentions/pm-plugins/main.js +2 -2
- package/dist/cjs/plugins/placeholder/index.js +2 -3
- package/dist/cjs/plugins/status/plugin.js +2 -2
- package/dist/cjs/plugins/unsupported-content/index.js +3 -3
- package/dist/cjs/ui/LinkSearch/ToolbarComponents.js +4 -11
- package/dist/cjs/utils/document.js +7 -249
- package/dist/cjs/utils/index.js +1 -23
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +2 -1
- package/dist/es2019/create-editor/ReactEditorViewInternal.js +1 -1
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/labs/next/internal/hooks/use-editor/create-editor.js +1 -1
- package/dist/es2019/messages.js +2 -54
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/es2019/plugins/base/pm-plugins/scroll-gutter.js +1 -1
- package/dist/es2019/plugins/card/nodeviews/blockCard.js +1 -1
- package/dist/es2019/plugins/card/nodeviews/embedCard.js +3 -3
- package/dist/es2019/plugins/card/nodeviews/genericCard.js +2 -1
- package/dist/es2019/plugins/card/pm-plugins/doc.js +2 -3
- package/dist/es2019/plugins/card/pm-plugins/keymap.js +3 -3
- package/dist/es2019/plugins/card/pm-plugins/main.js +1 -1
- package/dist/es2019/plugins/card/toolbar.js +8 -10
- package/dist/es2019/plugins/card/ui/EditLinkToolbar.js +10 -8
- package/dist/es2019/plugins/card/ui/ResizableEmbedCard.js +1 -4
- package/dist/es2019/plugins/card/utils.js +1 -2
- package/dist/es2019/plugins/clear-marks-on-change-to-empty-document/index.js +1 -1
- package/dist/es2019/plugins/custom-autoformat/doc.js +1 -1
- package/dist/es2019/plugins/date/pm-plugins/main.js +1 -1
- package/dist/es2019/plugins/emoji/index.js +1 -1
- package/dist/es2019/plugins/floating-toolbar/index.js +5 -2
- package/dist/es2019/plugins/hyperlink/Toolbar.js +3 -3
- package/dist/es2019/plugins/hyperlink/commands.js +1 -2
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +1 -1
- package/dist/es2019/plugins/layout/actions.js +1 -1
- package/dist/es2019/plugins/media/nodeviews/mediaNodeUpdater.js +1 -1
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +1 -1
- package/dist/es2019/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +1 -1
- package/dist/es2019/plugins/media/toolbar/index.js +10 -9
- package/dist/es2019/plugins/media/toolbar/linking-toolbar-appearance.js +2 -1
- package/dist/es2019/plugins/media/toolbar/linking.js +4 -4
- package/dist/es2019/plugins/media/ui/MediaLinkingToolbar.js +1 -1
- package/dist/es2019/plugins/media/ui/ResizableMediaSingle/index.js +2 -4
- package/dist/es2019/plugins/media/utils/media-files.js +4 -3
- package/dist/es2019/plugins/mentions/pm-plugins/main.js +1 -1
- package/dist/es2019/plugins/placeholder/index.js +1 -1
- package/dist/es2019/plugins/status/plugin.js +1 -1
- package/dist/es2019/plugins/unsupported-content/index.js +1 -1
- package/dist/es2019/ui/LinkSearch/ToolbarComponents.js +1 -4
- package/dist/es2019/utils/document.js +3 -244
- package/dist/es2019/utils/index.js +1 -4
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +2 -1
- package/dist/esm/create-editor/ReactEditorViewInternal.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/labs/next/internal/hooks/use-editor/create-editor.js +1 -1
- package/dist/esm/messages.js +2 -54
- package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/esm/plugins/base/pm-plugins/scroll-gutter.js +1 -1
- package/dist/esm/plugins/card/nodeviews/blockCard.js +1 -1
- package/dist/esm/plugins/card/nodeviews/embedCard.js +3 -3
- package/dist/esm/plugins/card/nodeviews/genericCard.js +2 -1
- package/dist/esm/plugins/card/pm-plugins/doc.js +2 -3
- package/dist/esm/plugins/card/pm-plugins/keymap.js +3 -3
- package/dist/esm/plugins/card/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/card/toolbar.js +8 -10
- package/dist/esm/plugins/card/ui/EditLinkToolbar.js +18 -16
- package/dist/esm/plugins/card/ui/ResizableEmbedCard.js +1 -4
- package/dist/esm/plugins/card/utils.js +1 -2
- package/dist/esm/plugins/clear-marks-on-change-to-empty-document/index.js +1 -1
- package/dist/esm/plugins/custom-autoformat/doc.js +1 -1
- package/dist/esm/plugins/date/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/emoji/index.js +1 -1
- package/dist/esm/plugins/floating-toolbar/index.js +5 -2
- package/dist/esm/plugins/hyperlink/Toolbar.js +3 -3
- package/dist/esm/plugins/hyperlink/commands.js +1 -2
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +1 -1
- package/dist/esm/plugins/layout/actions.js +1 -1
- package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +1 -1
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +1 -1
- package/dist/esm/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +1 -1
- package/dist/esm/plugins/media/toolbar/index.js +10 -9
- package/dist/esm/plugins/media/toolbar/linking-toolbar-appearance.js +2 -1
- package/dist/esm/plugins/media/toolbar/linking.js +4 -4
- package/dist/esm/plugins/media/ui/MediaLinkingToolbar.js +1 -1
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +2 -4
- package/dist/esm/plugins/media/utils/media-files.js +4 -3
- package/dist/esm/plugins/mentions/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/placeholder/index.js +1 -1
- package/dist/esm/plugins/status/plugin.js +1 -1
- package/dist/esm/plugins/unsupported-content/index.js +1 -1
- package/dist/esm/ui/LinkSearch/ToolbarComponents.js +1 -4
- package/dist/esm/utils/document.js +6 -240
- package/dist/esm/utils/index.js +1 -4
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/index.d.ts +1 -2
- package/dist/types/labs/next/presets/cxhtml.d.ts +9 -3
- package/dist/types/labs/next/presets/default.d.ts +13 -1
- package/dist/types/labs/next/presets/mobile.d.ts +9 -3
- package/dist/types/messages.d.ts +2 -53
- package/dist/types/plugins/card/index.d.ts +3 -1
- package/dist/types/plugins/card/nodeviews/blockCard.d.ts +1 -1
- package/dist/types/plugins/card/nodeviews/genericCard.d.ts +3 -3
- package/dist/types/plugins/card/nodeviews/inlineCard.d.ts +1 -1
- package/dist/types/plugins/card/toolbar.d.ts +1 -1
- package/dist/types/plugins/card/types.d.ts +1 -1
- package/dist/types/plugins/card/ui/EditLinkToolbar.d.ts +7 -4
- package/dist/types/plugins/card/ui/ResizableEmbedCard.d.ts +1 -1
- package/dist/types/plugins/date/nodeviews/date.d.ts +1 -1
- package/dist/types/plugins/emoji/nodeviews/emoji.d.ts +1 -1
- package/dist/types/plugins/floating-toolbar/index.d.ts +2 -6
- package/dist/types/plugins/floating-toolbar/ui/Toolbar.d.ts +1 -1
- package/dist/types/plugins/hyperlink/Toolbar.d.ts +1 -1
- package/dist/types/plugins/hyperlink/commands.d.ts +2 -3
- package/dist/types/plugins/hyperlink/index.d.ts +1 -1
- package/dist/types/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.d.ts +1 -1
- package/dist/types/plugins/hyperlink/ui/HyperlinkAddToolbar/index.d.ts +1 -1
- package/dist/types/plugins/media/index.d.ts +3 -1
- package/dist/types/plugins/media/nodeviews/mediaInline.d.ts +1 -1
- package/dist/types/plugins/media/nodeviews/mediaNodeUpdater.d.ts +1 -1
- package/dist/types/plugins/media/nodeviews/types.d.ts +1 -1
- package/dist/types/plugins/media/toolbar/linking.d.ts +3 -1
- package/dist/types/plugins/media/ui/ResizableMediaSingle/types.d.ts +0 -15
- package/dist/types/plugins/media/utils/media-files.d.ts +1 -1
- package/dist/types/plugins/mentions/nodeviews/mention.d.ts +1 -1
- package/dist/types/plugins/status/nodeviews/status.d.ts +1 -1
- package/dist/types/plugins/unsupported-content/unsupported-inline-node-view.d.ts +1 -1
- package/dist/types/types/editor-props.d.ts +1 -1
- package/dist/types/ui/LinkSearch/ToolbarComponents.d.ts +0 -4
- package/dist/types/utils/document.d.ts +0 -12
- package/dist/types/utils/index.d.ts +1 -2
- package/dist/types-ts4.5/index.d.ts +1 -2
- package/dist/types-ts4.5/labs/next/presets/cxhtml.d.ts +9 -3
- package/dist/types-ts4.5/labs/next/presets/default.d.ts +13 -1
- package/dist/types-ts4.5/labs/next/presets/mobile.d.ts +9 -3
- package/dist/types-ts4.5/messages.d.ts +2 -53
- package/dist/types-ts4.5/plugins/card/index.d.ts +3 -1
- package/dist/types-ts4.5/plugins/card/nodeviews/blockCard.d.ts +1 -1
- package/dist/types-ts4.5/plugins/card/nodeviews/genericCard.d.ts +3 -3
- package/dist/types-ts4.5/plugins/card/nodeviews/inlineCard.d.ts +1 -1
- package/dist/types-ts4.5/plugins/card/toolbar.d.ts +1 -1
- package/dist/types-ts4.5/plugins/card/types.d.ts +1 -1
- package/dist/types-ts4.5/plugins/card/ui/EditLinkToolbar.d.ts +7 -4
- package/dist/types-ts4.5/plugins/card/ui/ResizableEmbedCard.d.ts +1 -1
- package/dist/types-ts4.5/plugins/date/nodeviews/date.d.ts +1 -1
- package/dist/types-ts4.5/plugins/emoji/nodeviews/emoji.d.ts +1 -1
- package/dist/types-ts4.5/plugins/floating-toolbar/index.d.ts +2 -9
- package/dist/types-ts4.5/plugins/floating-toolbar/ui/Toolbar.d.ts +1 -1
- package/dist/types-ts4.5/plugins/hyperlink/Toolbar.d.ts +1 -1
- package/dist/types-ts4.5/plugins/hyperlink/commands.d.ts +2 -3
- package/dist/types-ts4.5/plugins/hyperlink/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.d.ts +1 -1
- package/dist/types-ts4.5/plugins/hyperlink/ui/HyperlinkAddToolbar/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/index.d.ts +3 -1
- package/dist/types-ts4.5/plugins/media/nodeviews/mediaInline.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/nodeviews/mediaNodeUpdater.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/nodeviews/types.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/toolbar/linking.d.ts +3 -1
- package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/types.d.ts +0 -15
- package/dist/types-ts4.5/plugins/media/utils/media-files.d.ts +1 -1
- package/dist/types-ts4.5/plugins/mentions/nodeviews/mention.d.ts +1 -1
- package/dist/types-ts4.5/plugins/status/nodeviews/status.d.ts +1 -1
- package/dist/types-ts4.5/plugins/unsupported-content/unsupported-inline-node-view.d.ts +1 -1
- package/dist/types-ts4.5/types/editor-props.d.ts +1 -1
- package/dist/types-ts4.5/ui/LinkSearch/ToolbarComponents.d.ts +0 -4
- package/dist/types-ts4.5/utils/document.d.ts +0 -12
- package/dist/types-ts4.5/utils/index.d.ts +1 -2
- package/package.json +11 -14
- package/report.api.md +11 -34
- package/tmp/api-report-tmp.d.ts +10 -34
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.js +0 -227
- package/dist/cjs/plugins/hyperlink/types.js +0 -5
- package/dist/cjs/ui/MediaAndEmbedsToolbar/index.js +0 -152
- package/dist/cjs/ui/Resizer/index.js +0 -210
- package/dist/cjs/ui/Resizer/styled.js +0 -15
- package/dist/cjs/ui/Resizer/types.js +0 -5
- package/dist/cjs/ui/Resizer/utils.js +0 -21
- package/dist/cjs/utils/filter/privacy-filter.js +0 -55
- package/dist/cjs/utils/linking-utils.js +0 -84
- package/dist/cjs/utils/rich-media-utils.js +0 -130
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.js +0 -221
- package/dist/es2019/plugins/hyperlink/types.js +0 -1
- package/dist/es2019/ui/MediaAndEmbedsToolbar/index.js +0 -159
- package/dist/es2019/ui/Resizer/index.js +0 -191
- package/dist/es2019/ui/Resizer/styled.js +0 -15
- package/dist/es2019/ui/Resizer/types.js +0 -1
- package/dist/es2019/ui/Resizer/utils.js +0 -12
- package/dist/es2019/utils/filter/privacy-filter.js +0 -47
- package/dist/es2019/utils/linking-utils.js +0 -74
- package/dist/es2019/utils/rich-media-utils.js +0 -108
- package/dist/esm/nodeviews/getInlineNodeViewProducer.js +0 -217
- package/dist/esm/plugins/hyperlink/types.js +0 -1
- package/dist/esm/ui/MediaAndEmbedsToolbar/index.js +0 -144
- package/dist/esm/ui/Resizer/index.js +0 -203
- package/dist/esm/ui/Resizer/styled.js +0 -7
- package/dist/esm/ui/Resizer/types.js +0 -1
- package/dist/esm/ui/Resizer/utils.js +0 -12
- package/dist/esm/utils/filter/privacy-filter.js +0 -48
- package/dist/esm/utils/linking-utils.js +0 -74
- package/dist/esm/utils/rich-media-utils.js +0 -117
- package/dist/types/nodeviews/getInlineNodeViewProducer.d.ts +0 -24
- package/dist/types/plugins/hyperlink/types.d.ts +0 -35
- package/dist/types/ui/MediaAndEmbedsToolbar/index.d.ts +0 -9
- package/dist/types/ui/Resizer/index.d.ts +0 -41
- package/dist/types/ui/Resizer/styled.d.ts +0 -2
- package/dist/types/ui/Resizer/types.d.ts +0 -26
- package/dist/types/ui/Resizer/utils.d.ts +0 -6
- package/dist/types/utils/filter/privacy-filter.d.ts +0 -9
- package/dist/types/utils/linking-utils.d.ts +0 -14
- package/dist/types/utils/rich-media-utils.d.ts +0 -8
- package/dist/types-ts4.5/nodeviews/getInlineNodeViewProducer.d.ts +0 -24
- package/dist/types-ts4.5/plugins/hyperlink/types.d.ts +0 -35
- package/dist/types-ts4.5/ui/MediaAndEmbedsToolbar/index.d.ts +0 -9
- package/dist/types-ts4.5/ui/Resizer/index.d.ts +0 -41
- package/dist/types-ts4.5/ui/Resizer/styled.d.ts +0 -2
- package/dist/types-ts4.5/ui/Resizer/types.d.ts +0 -26
- package/dist/types-ts4.5/ui/Resizer/utils.d.ts +0 -6
- package/dist/types-ts4.5/utils/filter/privacy-filter.d.ts +0 -9
- package/dist/types-ts4.5/utils/linking-utils.d.ts +0 -14
- package/dist/types-ts4.5/utils/rich-media-utils.d.ts +0 -8
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { EditorState } from 'prosemirror-state';
|
|
2
|
-
import { IntlShape } from 'react-intl-next';
|
|
3
|
-
import { NodeType } from 'prosemirror-model';
|
|
4
|
-
import { FloatingToolbarItem } from '../../plugins/floating-toolbar/types';
|
|
5
|
-
import { Command } from '../../types';
|
|
6
|
-
import type { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
7
|
-
import type { PluginDependenciesAPI } from '@atlaskit/editor-common/types';
|
|
8
|
-
declare const buildLayoutButtons: (state: EditorState, intl: IntlShape, nodeType: NodeType, widthPluginDependencyApi: PluginDependenciesAPI<typeof widthPlugin> | undefined, allowResizing?: boolean, allowResizingInTables?: boolean, allowWrapping?: boolean, allowAlignment?: boolean) => FloatingToolbarItem<Command>[];
|
|
9
|
-
export default buildLayoutButtons;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { RefObject } from 'react';
|
|
3
|
-
import { Resizable } from 're-resizable';
|
|
4
|
-
import { RichMediaLayout } from '@atlaskit/adf-schema';
|
|
5
|
-
import { Props as ResizableMediaSingleProps, EnabledHandles } from './types';
|
|
6
|
-
import { DispatchAnalyticsEvent } from '../../plugins/analytics';
|
|
7
|
-
export interface ResizableNumberSize {
|
|
8
|
-
width: number;
|
|
9
|
-
height: number;
|
|
10
|
-
}
|
|
11
|
-
export type ResizerProps = Omit<ResizableMediaSingleProps, 'height' | 'width'> & {
|
|
12
|
-
selected?: boolean;
|
|
13
|
-
enable: EnabledHandles;
|
|
14
|
-
calcNewSize: (newWidth: number, stop: boolean) => {
|
|
15
|
-
layout: RichMediaLayout;
|
|
16
|
-
width: number | null;
|
|
17
|
-
};
|
|
18
|
-
snapPoints: number[];
|
|
19
|
-
scaleFactor?: number;
|
|
20
|
-
highlights: (width: number, snapPoints: number[]) => number[] | string[];
|
|
21
|
-
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
22
|
-
nodeType?: 'media' | 'embed';
|
|
23
|
-
innerPadding?: number;
|
|
24
|
-
height?: number;
|
|
25
|
-
width: number;
|
|
26
|
-
ratio?: string;
|
|
27
|
-
handleComponentFunc?: (side: string) => React.ReactElement<any> | undefined;
|
|
28
|
-
};
|
|
29
|
-
export type ResizerState = {
|
|
30
|
-
isResizing: boolean;
|
|
31
|
-
};
|
|
32
|
-
export default class Resizer extends React.Component<ResizerProps, ResizerState> {
|
|
33
|
-
resizable: RefObject<Resizable>;
|
|
34
|
-
state: {
|
|
35
|
-
isResizing: boolean;
|
|
36
|
-
};
|
|
37
|
-
private handleResizeStart;
|
|
38
|
-
private handleResize;
|
|
39
|
-
private handleResizeStop;
|
|
40
|
-
render(): JSX.Element;
|
|
41
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { RichMediaLayout } from '@atlaskit/adf-schema';
|
|
2
|
-
import type { MediaSingleProps } from '@atlaskit/editor-common/ui';
|
|
3
|
-
import { MediaClientConfig } from '@atlaskit/media-core';
|
|
4
|
-
import type { GridType } from '@atlaskit/editor-common/types';
|
|
5
|
-
import { EditorView } from 'prosemirror-view';
|
|
6
|
-
import { getPosHandler } from '../../nodeviews/types';
|
|
7
|
-
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
8
|
-
export type EnabledHandles = {
|
|
9
|
-
left?: boolean;
|
|
10
|
-
right?: boolean;
|
|
11
|
-
};
|
|
12
|
-
export type Props = MediaSingleProps & {
|
|
13
|
-
updateSize: (width: number | null, layout: RichMediaLayout) => void;
|
|
14
|
-
displayGrid: ((show: boolean, type: GridType, highlight: number[] | string[]) => void) | undefined;
|
|
15
|
-
getPos: getPosHandler;
|
|
16
|
-
view: EditorView;
|
|
17
|
-
lineLength: number;
|
|
18
|
-
gridSize: number;
|
|
19
|
-
containerWidth: number;
|
|
20
|
-
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
21
|
-
allowBreakoutSnapPoints?: boolean;
|
|
22
|
-
selected?: boolean;
|
|
23
|
-
viewMediaClientConfig?: MediaClientConfig;
|
|
24
|
-
fullWidthMode?: boolean;
|
|
25
|
-
updateWidth?: (newWidth: number) => void;
|
|
26
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
2
|
-
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
-
/**
|
|
4
|
-
* Sanitises a document where some content should not be in the document (e.g. mention names).
|
|
5
|
-
*
|
|
6
|
-
* It is expected that these names we be resolved separately (e.g. when rendering
|
|
7
|
-
* a node view).
|
|
8
|
-
*/
|
|
9
|
-
export declare function sanitizeNodeForPrivacy(json: JSONDocNode, providerFactory?: ProviderFactory): JSONDocNode;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, AnalyticsEventPayload, ACTION_SUBJECT_ID, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
export declare const buildEditLinkPayload: (type: LinkType) => AnalyticsEventPayload;
|
|
3
|
-
export type LinkType = ACTION_SUBJECT_ID.CARD_INLINE | ACTION_SUBJECT_ID.CARD_BLOCK | ACTION_SUBJECT_ID.EMBEDS | ACTION_SUBJECT_ID.HYPERLINK;
|
|
4
|
-
export declare const buildVisitedLinkPayload: (type: LinkType) => AnalyticsEventPayload;
|
|
5
|
-
export declare const buildOpenedSettingsPayload: (type: LinkType) => AnalyticsEventPayload;
|
|
6
|
-
export declare const unlinkPayload: (type: LinkType) => {
|
|
7
|
-
action: ACTION;
|
|
8
|
-
actionSubject: ACTION_SUBJECT;
|
|
9
|
-
actionSubjectId: ACTION_SUBJECT_ID.CARD_INLINE | undefined;
|
|
10
|
-
attributes: {
|
|
11
|
-
inputMethod: INPUT_METHOD;
|
|
12
|
-
};
|
|
13
|
-
eventType: EVENT_TYPE;
|
|
14
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { SnapPointsProps } from './../plugins/media/ui/ResizableMediaSingle/types';
|
|
2
|
-
import { RichMediaAttributes, RichMediaLayout } from '@atlaskit/adf-schema';
|
|
3
|
-
import { EditorView } from 'prosemirror-view';
|
|
4
|
-
export declare const nonWrappedLayouts: RichMediaLayout[];
|
|
5
|
-
export declare const floatingLayouts: string[];
|
|
6
|
-
export declare const isRichMediaInsideOfBlockNode: (view: EditorView, pos: number | boolean) => boolean;
|
|
7
|
-
export declare const alignAttributes: (layout: RichMediaLayout, oldAttrs: RichMediaAttributes, gridSize: number | undefined, originalWidth: number, lineLength?: number) => RichMediaAttributes;
|
|
8
|
-
export declare function calculateSnapPoints({ $pos, akEditorWideLayoutWidth, allowBreakoutSnapPoints, containerWidth, gridSize, gridWidth, insideInlineLike, insideLayout, isVideoFile, lineLength, offsetLeft, wrappedLayout, }: SnapPointsProps): number[];
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { EditorProps, EditorView } from 'prosemirror-view';
|
|
3
|
-
import { Node as PMNode } from 'prosemirror-model';
|
|
4
|
-
import type { PMPluginFactoryParams } from '../types';
|
|
5
|
-
export type InlineNodeViewComponentProps = {
|
|
6
|
-
view: EditorView;
|
|
7
|
-
getPos: NodeViewParams['getPos'];
|
|
8
|
-
node: PMNode;
|
|
9
|
-
};
|
|
10
|
-
type InlineNodeViewComponent<ExtraComponentProps> = React.ComponentType<InlineNodeViewComponentProps & ExtraComponentProps>;
|
|
11
|
-
export declare const inlineNodeViewClassname = "inlineNodeView";
|
|
12
|
-
type NodeViewProducer = NonNullable<EditorProps['nodeViews']>[string];
|
|
13
|
-
type NodeViewParams = {
|
|
14
|
-
node: Parameters<NodeViewProducer>[0];
|
|
15
|
-
view: Parameters<NodeViewProducer>[1];
|
|
16
|
-
getPos: Parameters<NodeViewProducer>[2];
|
|
17
|
-
decorations: Parameters<NodeViewProducer>[3];
|
|
18
|
-
};
|
|
19
|
-
export declare function getInlineNodeViewProducer<ExtraComponentProps>({ pmPluginFactoryParams, Component, extraComponentProps, }: {
|
|
20
|
-
pmPluginFactoryParams: PMPluginFactoryParams;
|
|
21
|
-
Component: InlineNodeViewComponent<ExtraComponentProps>;
|
|
22
|
-
extraComponentProps?: ExtraComponentProps;
|
|
23
|
-
}): NodeViewProducer;
|
|
24
|
-
export {};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { CardOptions } from '@atlaskit/editor-common/card';
|
|
2
|
-
import { LinkPickerProps } from '@atlaskit/link-picker';
|
|
3
|
-
import { INPUT_METHOD } from '../analytics/types';
|
|
4
|
-
import { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
5
|
-
export type LinkInputType = INPUT_METHOD.MANUAL | INPUT_METHOD.TYPEAHEAD;
|
|
6
|
-
/**
|
|
7
|
-
* Configuration for the link picker
|
|
8
|
-
* Extends `LinkPickerProps` to provide future extensibility out-of-the-box
|
|
9
|
-
*/
|
|
10
|
-
export interface LinkPickerOptions extends Partial<LinkPickerProps> {
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Configuration for editor linking behaviours
|
|
14
|
-
*/
|
|
15
|
-
export interface LinkingOptions {
|
|
16
|
-
/**
|
|
17
|
-
* Initial props to configure the link picker component with. Primarily used to provide link search and suggestions capabilities.
|
|
18
|
-
* @see https://atlaskit.atlassian.com/packages/editor/editor-core/example/full-page-with-link-picker
|
|
19
|
-
* @see https://atlaskit.atlassian.com/packages/linking-platform/link-picker
|
|
20
|
-
*/
|
|
21
|
-
linkPicker?: LinkPickerOptions;
|
|
22
|
-
/**
|
|
23
|
-
* Enables and configure smart link behaviour
|
|
24
|
-
*/
|
|
25
|
-
smartLinks?: CardOptions;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Configuration for the Hyperlink plugin
|
|
29
|
-
*/
|
|
30
|
-
export interface HyperlinkPluginOptions {
|
|
31
|
-
cardOptions?: CardOptions;
|
|
32
|
-
linkPicker?: LinkPickerOptions;
|
|
33
|
-
platform?: 'mobile' | 'web';
|
|
34
|
-
editorAppearance?: EditorAppearance;
|
|
35
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { EditorState } from 'prosemirror-state';
|
|
2
|
-
import { IntlShape } from 'react-intl-next';
|
|
3
|
-
import { NodeType } from 'prosemirror-model';
|
|
4
|
-
import { FloatingToolbarItem } from '../../plugins/floating-toolbar/types';
|
|
5
|
-
import { Command } from '../../types';
|
|
6
|
-
import type { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
7
|
-
import type { PluginDependenciesAPI } from '@atlaskit/editor-common/types';
|
|
8
|
-
declare const buildLayoutButtons: (state: EditorState, intl: IntlShape, nodeType: NodeType, widthPluginDependencyApi: PluginDependenciesAPI<typeof widthPlugin> | undefined, allowResizing?: boolean, allowResizingInTables?: boolean, allowWrapping?: boolean, allowAlignment?: boolean) => FloatingToolbarItem<Command>[];
|
|
9
|
-
export default buildLayoutButtons;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { RefObject } from 'react';
|
|
3
|
-
import { Resizable } from 're-resizable';
|
|
4
|
-
import { RichMediaLayout } from '@atlaskit/adf-schema';
|
|
5
|
-
import { Props as ResizableMediaSingleProps, EnabledHandles } from './types';
|
|
6
|
-
import { DispatchAnalyticsEvent } from '../../plugins/analytics';
|
|
7
|
-
export interface ResizableNumberSize {
|
|
8
|
-
width: number;
|
|
9
|
-
height: number;
|
|
10
|
-
}
|
|
11
|
-
export type ResizerProps = Omit<ResizableMediaSingleProps, 'height' | 'width'> & {
|
|
12
|
-
selected?: boolean;
|
|
13
|
-
enable: EnabledHandles;
|
|
14
|
-
calcNewSize: (newWidth: number, stop: boolean) => {
|
|
15
|
-
layout: RichMediaLayout;
|
|
16
|
-
width: number | null;
|
|
17
|
-
};
|
|
18
|
-
snapPoints: number[];
|
|
19
|
-
scaleFactor?: number;
|
|
20
|
-
highlights: (width: number, snapPoints: number[]) => number[] | string[];
|
|
21
|
-
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
22
|
-
nodeType?: 'media' | 'embed';
|
|
23
|
-
innerPadding?: number;
|
|
24
|
-
height?: number;
|
|
25
|
-
width: number;
|
|
26
|
-
ratio?: string;
|
|
27
|
-
handleComponentFunc?: (side: string) => React.ReactElement<any> | undefined;
|
|
28
|
-
};
|
|
29
|
-
export type ResizerState = {
|
|
30
|
-
isResizing: boolean;
|
|
31
|
-
};
|
|
32
|
-
export default class Resizer extends React.Component<ResizerProps, ResizerState> {
|
|
33
|
-
resizable: RefObject<Resizable>;
|
|
34
|
-
state: {
|
|
35
|
-
isResizing: boolean;
|
|
36
|
-
};
|
|
37
|
-
private handleResizeStart;
|
|
38
|
-
private handleResize;
|
|
39
|
-
private handleResizeStop;
|
|
40
|
-
render(): JSX.Element;
|
|
41
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { RichMediaLayout } from '@atlaskit/adf-schema';
|
|
2
|
-
import type { MediaSingleProps } from '@atlaskit/editor-common/ui';
|
|
3
|
-
import { MediaClientConfig } from '@atlaskit/media-core';
|
|
4
|
-
import type { GridType } from '@atlaskit/editor-common/types';
|
|
5
|
-
import { EditorView } from 'prosemirror-view';
|
|
6
|
-
import { getPosHandler } from '../../nodeviews/types';
|
|
7
|
-
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
8
|
-
export type EnabledHandles = {
|
|
9
|
-
left?: boolean;
|
|
10
|
-
right?: boolean;
|
|
11
|
-
};
|
|
12
|
-
export type Props = MediaSingleProps & {
|
|
13
|
-
updateSize: (width: number | null, layout: RichMediaLayout) => void;
|
|
14
|
-
displayGrid: ((show: boolean, type: GridType, highlight: number[] | string[]) => void) | undefined;
|
|
15
|
-
getPos: getPosHandler;
|
|
16
|
-
view: EditorView;
|
|
17
|
-
lineLength: number;
|
|
18
|
-
gridSize: number;
|
|
19
|
-
containerWidth: number;
|
|
20
|
-
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
21
|
-
allowBreakoutSnapPoints?: boolean;
|
|
22
|
-
selected?: boolean;
|
|
23
|
-
viewMediaClientConfig?: MediaClientConfig;
|
|
24
|
-
fullWidthMode?: boolean;
|
|
25
|
-
updateWidth?: (newWidth: number) => void;
|
|
26
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
2
|
-
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
-
/**
|
|
4
|
-
* Sanitises a document where some content should not be in the document (e.g. mention names).
|
|
5
|
-
*
|
|
6
|
-
* It is expected that these names we be resolved separately (e.g. when rendering
|
|
7
|
-
* a node view).
|
|
8
|
-
*/
|
|
9
|
-
export declare function sanitizeNodeForPrivacy(json: JSONDocNode, providerFactory?: ProviderFactory): JSONDocNode;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, AnalyticsEventPayload, ACTION_SUBJECT_ID, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
export declare const buildEditLinkPayload: (type: LinkType) => AnalyticsEventPayload;
|
|
3
|
-
export type LinkType = ACTION_SUBJECT_ID.CARD_INLINE | ACTION_SUBJECT_ID.CARD_BLOCK | ACTION_SUBJECT_ID.EMBEDS | ACTION_SUBJECT_ID.HYPERLINK;
|
|
4
|
-
export declare const buildVisitedLinkPayload: (type: LinkType) => AnalyticsEventPayload;
|
|
5
|
-
export declare const buildOpenedSettingsPayload: (type: LinkType) => AnalyticsEventPayload;
|
|
6
|
-
export declare const unlinkPayload: (type: LinkType) => {
|
|
7
|
-
action: ACTION;
|
|
8
|
-
actionSubject: ACTION_SUBJECT;
|
|
9
|
-
actionSubjectId: ACTION_SUBJECT_ID.CARD_INLINE | undefined;
|
|
10
|
-
attributes: {
|
|
11
|
-
inputMethod: INPUT_METHOD;
|
|
12
|
-
};
|
|
13
|
-
eventType: EVENT_TYPE;
|
|
14
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { SnapPointsProps } from './../plugins/media/ui/ResizableMediaSingle/types';
|
|
2
|
-
import { RichMediaAttributes, RichMediaLayout } from '@atlaskit/adf-schema';
|
|
3
|
-
import { EditorView } from 'prosemirror-view';
|
|
4
|
-
export declare const nonWrappedLayouts: RichMediaLayout[];
|
|
5
|
-
export declare const floatingLayouts: string[];
|
|
6
|
-
export declare const isRichMediaInsideOfBlockNode: (view: EditorView, pos: number | boolean) => boolean;
|
|
7
|
-
export declare const alignAttributes: (layout: RichMediaLayout, oldAttrs: RichMediaAttributes, gridSize: number | undefined, originalWidth: number, lineLength?: number) => RichMediaAttributes;
|
|
8
|
-
export declare function calculateSnapPoints({ $pos, akEditorWideLayoutWidth, allowBreakoutSnapPoints, containerWidth, gridSize, gridWidth, insideInlineLike, insideLayout, isVideoFile, lineLength, offsetLeft, wrappedLayout, }: SnapPointsProps): number[];
|