@atlaskit/editor-common 74.5.1 → 74.6.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 +12 -0
- package/dist/cjs/analytics/index.js +26 -1
- package/dist/cjs/analytics/linking-utils.js +84 -0
- package/dist/cjs/card/MediaAndEmbedsToolbar/index.js +156 -0
- package/dist/cjs/card/index.js +9 -1
- package/dist/cjs/messages/index.js +14 -0
- package/dist/cjs/messages/link-toolbar.js +60 -0
- package/dist/cjs/messages/media-and-embed-toolbar.js +20 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +225 -0
- package/dist/cjs/react-node-view/index.js +13 -0
- package/dist/cjs/{ui/Resizer/index.js → resizer/Resizer.js} +1 -1
- package/dist/cjs/{resizer.js → resizer/index.js} +1 -1
- package/dist/cjs/resizer/utils.js +21 -0
- package/dist/cjs/types/hyperlink.js +5 -0
- package/dist/cjs/types/resizable-media-single.js +5 -0
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/LinkSearch/const.js +14 -0
- package/dist/cjs/ui/ResizerLegacy/index.js +210 -0
- package/dist/cjs/ui/ResizerLegacy/styled.js +15 -0
- package/dist/cjs/ui/ResizerLegacy/types.js +5 -0
- package/dist/cjs/ui/ResizerLegacy/utils.js +21 -0
- package/dist/cjs/ui/index.js +58 -0
- package/dist/cjs/utils/document.js +258 -0
- package/dist/cjs/utils/editor-core-utils.js +7 -2
- package/dist/cjs/utils/filter/privacy-filter.js +55 -0
- package/dist/cjs/utils/index.js +75 -0
- package/dist/cjs/utils/rich-media-utils.js +131 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/analytics/index.js +2 -1
- package/dist/es2019/analytics/linking-utils.js +74 -0
- package/dist/es2019/card/MediaAndEmbedsToolbar/index.js +161 -0
- package/dist/es2019/card/index.js +2 -1
- package/dist/es2019/messages/index.js +2 -0
- package/dist/es2019/messages/link-toolbar.js +53 -0
- package/dist/es2019/messages/media-and-embed-toolbar.js +13 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +219 -0
- package/dist/es2019/react-node-view/index.js +1 -0
- package/dist/es2019/{ui/Resizer/index.js → resizer/Resizer.js} +1 -1
- package/dist/es2019/resizer/index.js +1 -0
- package/dist/es2019/resizer/utils.js +12 -0
- package/dist/es2019/types/resizable-media-single.js +1 -0
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/LinkSearch/const.js +4 -0
- package/dist/es2019/ui/ResizerLegacy/index.js +191 -0
- package/dist/es2019/ui/ResizerLegacy/styled.js +15 -0
- package/dist/es2019/ui/ResizerLegacy/types.js +1 -0
- package/dist/es2019/ui/ResizerLegacy/utils.js +12 -0
- package/dist/es2019/ui/index.js +5 -1
- package/dist/es2019/utils/document.js +253 -0
- package/dist/es2019/utils/editor-core-utils.js +4 -0
- package/dist/es2019/utils/filter/privacy-filter.js +47 -0
- package/dist/es2019/utils/index.js +5 -2
- package/dist/es2019/utils/rich-media-utils.js +109 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/analytics/index.js +2 -1
- package/dist/esm/analytics/linking-utils.js +74 -0
- package/dist/esm/card/MediaAndEmbedsToolbar/index.js +146 -0
- package/dist/esm/card/index.js +2 -1
- package/dist/esm/messages/index.js +2 -0
- package/dist/esm/messages/link-toolbar.js +53 -0
- package/dist/esm/messages/media-and-embed-toolbar.js +13 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/react-node-view/getInlineNodeViewProducer.js +215 -0
- package/dist/esm/react-node-view/index.js +1 -0
- package/dist/esm/{ui/Resizer/index.js → resizer/Resizer.js} +1 -1
- package/dist/esm/resizer/index.js +1 -0
- package/dist/esm/resizer/types.js +1 -0
- package/dist/esm/resizer/utils.js +12 -0
- package/dist/esm/types/hyperlink.js +1 -0
- package/dist/esm/types/resizable-media-single.js +1 -0
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/LinkSearch/const.js +4 -0
- package/dist/esm/ui/ResizerLegacy/index.js +203 -0
- package/dist/esm/ui/ResizerLegacy/styled.js +7 -0
- package/dist/esm/ui/ResizerLegacy/types.js +1 -0
- package/dist/esm/ui/ResizerLegacy/utils.js +12 -0
- package/dist/esm/ui/index.js +5 -1
- package/dist/esm/utils/document.js +246 -0
- package/dist/esm/utils/editor-core-utils.js +4 -0
- package/dist/esm/utils/filter/privacy-filter.js +48 -0
- package/dist/esm/utils/index.js +5 -2
- package/dist/esm/utils/rich-media-utils.js +118 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/analytics/index.d.ts +2 -0
- package/dist/types/analytics/linking-utils.d.ts +14 -0
- package/dist/types/card/MediaAndEmbedsToolbar/index.d.ts +11 -0
- package/dist/types/card/index.d.ts +1 -0
- package/dist/types/messages/index.d.ts +2 -0
- package/dist/types/messages/link-toolbar.d.ts +52 -0
- package/dist/types/messages/media-and-embed-toolbar.d.ts +12 -0
- package/dist/types/react-node-view/getInlineNodeViewProducer.d.ts +25 -0
- package/dist/types/react-node-view/index.d.ts +3 -0
- package/dist/types/resizer/index.d.ts +2 -0
- package/dist/types/resizer/utils.d.ts +6 -0
- package/dist/types/types/hyperlink.d.ts +35 -0
- package/dist/types/types/index.d.ts +2 -0
- package/dist/types/types/resizable-media-single.d.ts +15 -0
- package/dist/types/ui/DropList/index.d.ts +1 -1
- package/dist/types/ui/LinkSearch/const.d.ts +4 -0
- package/dist/types/ui/ResizerLegacy/index.d.ts +40 -0
- package/dist/types/ui/ResizerLegacy/styled.d.ts +2 -0
- package/dist/types/ui/ResizerLegacy/types.d.ts +26 -0
- package/dist/types/ui/ResizerLegacy/utils.d.ts +6 -0
- package/dist/types/ui/index.d.ts +6 -0
- package/dist/types/utils/document.d.ts +19 -0
- package/dist/types/utils/editor-core-utils.d.ts +1 -0
- package/dist/types/utils/filter/privacy-filter.d.ts +9 -0
- package/dist/types/utils/index.d.ts +4 -1
- package/dist/types/utils/rich-media-utils.d.ts +8 -0
- package/dist/types-ts4.5/analytics/index.d.ts +2 -0
- package/dist/types-ts4.5/analytics/linking-utils.d.ts +14 -0
- package/dist/types-ts4.5/card/MediaAndEmbedsToolbar/index.d.ts +11 -0
- package/dist/types-ts4.5/card/index.d.ts +1 -0
- package/dist/types-ts4.5/messages/index.d.ts +2 -0
- package/dist/types-ts4.5/messages/link-toolbar.d.ts +52 -0
- package/dist/types-ts4.5/messages/media-and-embed-toolbar.d.ts +12 -0
- package/dist/types-ts4.5/react-node-view/getInlineNodeViewProducer.d.ts +25 -0
- package/dist/types-ts4.5/react-node-view/index.d.ts +3 -0
- package/dist/types-ts4.5/resizer/index.d.ts +2 -0
- package/dist/types-ts4.5/resizer/utils.d.ts +6 -0
- package/dist/types-ts4.5/types/hyperlink.d.ts +35 -0
- package/dist/types-ts4.5/types/index.d.ts +2 -0
- package/dist/types-ts4.5/types/resizable-media-single.d.ts +15 -0
- package/dist/types-ts4.5/ui/DropList/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/LinkSearch/const.d.ts +4 -0
- package/dist/types-ts4.5/ui/ResizerLegacy/index.d.ts +40 -0
- package/dist/types-ts4.5/ui/ResizerLegacy/styled.d.ts +2 -0
- package/dist/types-ts4.5/ui/ResizerLegacy/types.d.ts +26 -0
- package/dist/types-ts4.5/ui/ResizerLegacy/utils.d.ts +6 -0
- package/dist/types-ts4.5/ui/index.d.ts +6 -0
- package/dist/types-ts4.5/utils/document.d.ts +19 -0
- package/dist/types-ts4.5/utils/editor-core-utils.d.ts +1 -0
- package/dist/types-ts4.5/utils/filter/privacy-filter.d.ts +9 -0
- package/dist/types-ts4.5/utils/index.d.ts +4 -1
- package/dist/types-ts4.5/utils/rich-media-utils.d.ts +8 -0
- package/package.json +8 -7
- package/resizer/package.json +5 -5
- package/dist/cjs/ui/Resizer/utils.js +0 -8
- package/dist/es2019/resizer.js +0 -1
- package/dist/es2019/ui/Resizer/utils.js +0 -1
- package/dist/esm/resizer.js +0 -1
- package/dist/esm/ui/Resizer/utils.js +0 -1
- package/dist/types/resizer.d.ts +0 -2
- package/dist/types/ui/Resizer/utils.d.ts +0 -1
- package/dist/types-ts4.5/resizer.d.ts +0 -2
- package/dist/types-ts4.5/ui/Resizer/utils.d.ts +0 -1
- /package/dist/cjs/{ui/Resizer → resizer}/types.js +0 -0
- /package/dist/es2019/{ui/Resizer → resizer}/types.js +0 -0
- /package/dist/{esm/ui/Resizer/types.js → es2019/types/hyperlink.js} +0 -0
- /package/dist/types/{ui/Resizer/index.d.ts → resizer/Resizer.d.ts} +0 -0
- /package/dist/types/{ui/Resizer → resizer}/types.d.ts +0 -0
- /package/dist/types-ts4.5/{ui/Resizer/index.d.ts → resizer/Resizer.d.ts} +0 -0
- /package/dist/types-ts4.5/{ui/Resizer → resizer}/types.d.ts +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Node as PMNode } from 'prosemirror-model';
|
|
4
|
+
import { EditorProps, EditorView } from 'prosemirror-view';
|
|
5
|
+
import type { PMPluginFactoryParams } from '../types';
|
|
6
|
+
export type InlineNodeViewComponentProps = {
|
|
7
|
+
view: EditorView;
|
|
8
|
+
getPos: NodeViewParams['getPos'];
|
|
9
|
+
node: PMNode;
|
|
10
|
+
};
|
|
11
|
+
type InlineNodeViewComponent<ExtraComponentProps> = React.ComponentType<InlineNodeViewComponentProps & ExtraComponentProps>;
|
|
12
|
+
export declare const inlineNodeViewClassname = "inlineNodeView";
|
|
13
|
+
type NodeViewProducer = NonNullable<EditorProps['nodeViews']>[string];
|
|
14
|
+
type NodeViewParams = {
|
|
15
|
+
node: Parameters<NodeViewProducer>[0];
|
|
16
|
+
view: Parameters<NodeViewProducer>[1];
|
|
17
|
+
getPos: Parameters<NodeViewProducer>[2];
|
|
18
|
+
decorations: Parameters<NodeViewProducer>[3];
|
|
19
|
+
};
|
|
20
|
+
export declare function getInlineNodeViewProducer<ExtraComponentProps>({ pmPluginFactoryParams, Component, extraComponentProps, }: {
|
|
21
|
+
pmPluginFactoryParams: PMPluginFactoryParams;
|
|
22
|
+
Component: InlineNodeViewComponent<ExtraComponentProps>;
|
|
23
|
+
extraComponentProps?: ExtraComponentProps;
|
|
24
|
+
}): NodeViewProducer;
|
|
25
|
+
export {};
|
|
@@ -4,6 +4,9 @@ import { Decoration, EditorView, NodeView } from 'prosemirror-view';
|
|
|
4
4
|
import { EventDispatcher } from '../event-dispatcher';
|
|
5
5
|
import type { PortalProviderAPI } from '../ui/PortalProvider';
|
|
6
6
|
import { ForwardRef, getPosHandler, ReactComponentProps, shouldUpdate } from './types';
|
|
7
|
+
export type { getPosHandler, ReactComponentProps };
|
|
8
|
+
export type { InlineNodeViewComponentProps } from './getInlineNodeViewProducer';
|
|
9
|
+
export { getInlineNodeViewProducer, inlineNodeViewClassname, } from './getInlineNodeViewProducer';
|
|
7
10
|
export default class ReactNodeView<P = ReactComponentProps> implements NodeView {
|
|
8
11
|
private domRef?;
|
|
9
12
|
private contentDOMWrapper?;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { LinkPickerProps } from '@atlaskit/link-picker';
|
|
2
|
+
import { INPUT_METHOD } from '../analytics';
|
|
3
|
+
import { CardOptions } from '../card';
|
|
4
|
+
import { EditorAppearance } from './editor-appearance';
|
|
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
|
+
}
|
|
@@ -34,3 +34,5 @@ export type IconProps = {
|
|
|
34
34
|
};
|
|
35
35
|
export type { TTITracking, TransactionTracking, UITracking, CatchAllTracking, NodeViewTracking, BrowserFreezetracking, ProseMirrorRenderedTracking, InputTracking, ContentRetrievalTracking, OnChangeCallbackTracking, OnEditorReadyCallbackTracking, PasteTracking, RenderTracking, PerformanceTracking, } from './performance-tracking';
|
|
36
36
|
export type { GridType } from './grid';
|
|
37
|
+
export type { LinkInputType, LinkPickerOptions, LinkingOptions, HyperlinkPluginOptions, } from './hyperlink';
|
|
38
|
+
export type { SnapPointsProps } from './resizable-media-single';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ResolvedPos } from 'prosemirror-model';
|
|
2
|
+
export interface SnapPointsProps {
|
|
3
|
+
$pos?: ResolvedPos | null;
|
|
4
|
+
akEditorWideLayoutWidth: number;
|
|
5
|
+
allowBreakoutSnapPoints?: boolean;
|
|
6
|
+
containerWidth: number;
|
|
7
|
+
gridSize: number;
|
|
8
|
+
gridWidth: number;
|
|
9
|
+
insideInlineLike: boolean;
|
|
10
|
+
insideLayout: boolean;
|
|
11
|
+
isVideoFile: boolean;
|
|
12
|
+
lineLength: number;
|
|
13
|
+
offsetLeft: number;
|
|
14
|
+
wrappedLayout: boolean;
|
|
15
|
+
}
|
|
@@ -16,5 +16,5 @@ export type OpenChangedEvent = {
|
|
|
16
16
|
isOpen: boolean;
|
|
17
17
|
event: MouseEvent | KeyboardEvent;
|
|
18
18
|
};
|
|
19
|
-
declare const _default: import("react").ForwardRefExoticComponent<Pick<Omit<Props, keyof WithAnalyticsEventsProps> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "key" | "children" | "id" | "position" | "trigger" | "testId" | "analyticsContext" | "
|
|
19
|
+
declare const _default: import("react").ForwardRefExoticComponent<Pick<Omit<Props, keyof WithAnalyticsEventsProps> & import("react").RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "key" | "children" | "id" | "position" | "trigger" | "testId" | "analyticsContext" | "shouldFitContainer" | "isOpen" | "onPositioned" | "onOpenChange"> & import("react").RefAttributes<any>>;
|
|
20
20
|
export default _default;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React, { RefObject } from 'react';
|
|
2
|
+
import { Resizable } from 're-resizable';
|
|
3
|
+
import { RichMediaLayout } from '@atlaskit/adf-schema';
|
|
4
|
+
import { DispatchAnalyticsEvent } from '../../analytics';
|
|
5
|
+
import { EnabledHandles, Props as ResizableMediaSingleProps } from './types';
|
|
6
|
+
export interface ResizableNumberSize {
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
}
|
|
10
|
+
export type ResizerProps = Omit<ResizableMediaSingleProps, 'height' | 'width'> & {
|
|
11
|
+
selected?: boolean;
|
|
12
|
+
enable: EnabledHandles;
|
|
13
|
+
calcNewSize: (newWidth: number, stop: boolean) => {
|
|
14
|
+
layout: RichMediaLayout;
|
|
15
|
+
width: number | null;
|
|
16
|
+
};
|
|
17
|
+
snapPoints: number[];
|
|
18
|
+
scaleFactor?: number;
|
|
19
|
+
highlights: (width: number, snapPoints: number[]) => number[] | string[];
|
|
20
|
+
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
21
|
+
nodeType?: 'media' | 'embed';
|
|
22
|
+
innerPadding?: number;
|
|
23
|
+
height?: number;
|
|
24
|
+
width: number;
|
|
25
|
+
ratio?: string;
|
|
26
|
+
handleComponentFunc?: (side: string) => React.ReactElement<any> | undefined;
|
|
27
|
+
};
|
|
28
|
+
export type ResizerState = {
|
|
29
|
+
isResizing: boolean;
|
|
30
|
+
};
|
|
31
|
+
export default class Resizer extends React.Component<ResizerProps, ResizerState> {
|
|
32
|
+
resizable: RefObject<Resizable>;
|
|
33
|
+
state: {
|
|
34
|
+
isResizing: boolean;
|
|
35
|
+
};
|
|
36
|
+
private handleResizeStart;
|
|
37
|
+
private handleResize;
|
|
38
|
+
private handleResizeStop;
|
|
39
|
+
render(): JSX.Element;
|
|
40
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { EditorView } from 'prosemirror-view';
|
|
2
|
+
import { RichMediaLayout } from '@atlaskit/adf-schema';
|
|
3
|
+
import { MediaClientConfig } from '@atlaskit/media-core';
|
|
4
|
+
import type { DispatchAnalyticsEvent } from '../../analytics';
|
|
5
|
+
import type { getPosHandler } from '../../react-node-view';
|
|
6
|
+
import type { GridType } from '../../types';
|
|
7
|
+
import type { MediaSingleProps } from '../../ui';
|
|
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
|
+
};
|
|
@@ -26,4 +26,10 @@ export { clearNextSiblingMarginTopStyle, clearNextSiblingBlockMarkMarginTopStyle
|
|
|
26
26
|
export { IntlErrorBoundary, REACT_INTL_ERROR_MESSAGE, } from './IntlErrorBoundary';
|
|
27
27
|
export { default as IntlProviderIfMissingWrapper } from './IntlProviderIfMissingWrapper';
|
|
28
28
|
export { default as FloatingToolbarButton } from './FloatingToolbar/Button';
|
|
29
|
+
export { RECENT_SEARCH_WIDTH_IN_PX, RECENT_SEARCH_WIDTH_WITHOUT_ITEMS_IN_PX, RECENT_SEARCH_HEIGHT_IN_PX, LINKPICKER_HEIGHT_IN_PX, } from './LinkSearch/const';
|
|
29
30
|
export { ContextPanelProvider, ContextPanelWidthProvider, ContextPanelConsumer, ContextPanel, } from './ContextPanel/context';
|
|
31
|
+
export { default as Resizer } from './ResizerLegacy';
|
|
32
|
+
export type { ResizerState } from './ResizerLegacy';
|
|
33
|
+
export type { EnabledHandles, Props as ResizerProps, } from './ResizerLegacy/types';
|
|
34
|
+
export { snapTo, handleSides, imageAlignmentMap } from './ResizerLegacy/utils';
|
|
35
|
+
export { wrapperStyle } from './ResizerLegacy/styled';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Node, ResolvedPos, Schema } from 'prosemirror-model';
|
|
2
|
+
import { EditorState, ReadonlyTransaction, Transaction } from 'prosemirror-state';
|
|
3
|
+
import { DispatchAnalyticsEvent } from '../analytics';
|
|
4
|
+
import { ProviderFactory } from '../provider-factory';
|
|
5
|
+
import { ReplaceRawValue, Transformer } from '../types';
|
|
6
|
+
type ChangedFn = (node: Node<any>, pos: number, parent: Node<any>, index: number) => boolean | null | undefined | void;
|
|
7
|
+
export declare const getStepRange: (transaction: Transaction | ReadonlyTransaction) => {
|
|
8
|
+
from: number;
|
|
9
|
+
to: number;
|
|
10
|
+
} | null;
|
|
11
|
+
export declare function hasDocAsParent($anchor: ResolvedPos): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Checks if a node looks like an empty document
|
|
14
|
+
*/
|
|
15
|
+
export declare function isEmptyDocument(node: Node): boolean;
|
|
16
|
+
export declare function bracketTyped(state: EditorState): boolean;
|
|
17
|
+
export declare function nodesBetweenChanged(tr: Transaction | ReadonlyTransaction, f: ChangedFn, startPos?: number): void;
|
|
18
|
+
export declare function processRawValue(schema: Schema, value?: ReplaceRawValue, providerFactory?: ProviderFactory, sanitizePrivateContent?: boolean, contentTransformer?: Transformer<string>, dispatchAnalyticsEvent?: DispatchAnalyticsEvent): Node | undefined;
|
|
19
|
+
export {};
|
|
@@ -26,3 +26,4 @@ export declare const setNodeSelection: (view: EditorView, pos: number) => void;
|
|
|
26
26
|
export declare function setTextSelection(view: EditorView, anchor: number, head?: number): void;
|
|
27
27
|
export declare function nonNullable<T>(value: T): value is NonNullable<T>;
|
|
28
28
|
export declare const isValidPosition: (pos: number, state: EditorState) => boolean;
|
|
29
|
+
export declare const isInLayoutColumn: (state: EditorState) => boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
2
|
+
import { ProviderFactory } from '../../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;
|
|
@@ -6,7 +6,7 @@ export { default as ErrorReporter } from './error-reporter';
|
|
|
6
6
|
export type { ErrorReportingHandler } from './error-reporter';
|
|
7
7
|
export { isPastDate, timestampToIsoFormat, timestampToString, timestampToTaskContext, timestampToUTCDate, todayTimestampInUTC, } from './date';
|
|
8
8
|
export type { Date } from './date';
|
|
9
|
-
export { isElementInTableCell, isTextSelection, isLastItemMediaGroup, setNodeSelection, setTextSelection, nonNullable, stepAddsOneOf, stepHasSlice, extractSliceFromStep, isValidPosition, isEmptyParagraph, } from './editor-core-utils';
|
|
9
|
+
export { isElementInTableCell, isTextSelection, isLastItemMediaGroup, setNodeSelection, setTextSelection, nonNullable, stepAddsOneOf, stepHasSlice, extractSliceFromStep, isValidPosition, isEmptyParagraph, isInLayoutColumn, } from './editor-core-utils';
|
|
10
10
|
export { withImageLoader } from './imageLoader';
|
|
11
11
|
export type { ImageLoaderProps, ImageLoaderState, ImageStatus, } from './imageLoader';
|
|
12
12
|
export { absoluteBreakoutWidth, calcBreakoutWidth, calcWideWidth, breakoutConsts, calculateBreakoutStyles, calcBreakoutWidthPx, } from './breakout';
|
|
@@ -50,3 +50,6 @@ export { getItemCounterDigitsSize, getOrderFromOrderedListNode, resolveOrder, is
|
|
|
50
50
|
export { isFromCurrentDomain, LinkMatcher, normalizeUrl, linkifyContent, getLinkDomain, findFilepaths, isLinkInMatches, FILEPATH_REGEXP, DONTLINKIFY_REGEXP, getLinkCreationAnalyticsEvent, } from './hyperlink';
|
|
51
51
|
export declare const pmHistoryPluginKey = "history$";
|
|
52
52
|
export { gridTypeForLayout } from './grid';
|
|
53
|
+
export { nodesBetweenChanged, getStepRange, isEmptyDocument, processRawValue, hasDocAsParent, bracketTyped, } from './document';
|
|
54
|
+
export { floatingLayouts, isRichMediaInsideOfBlockNode, calculateSnapPoints, alignAttributes, } from './rich-media-utils';
|
|
55
|
+
export { sanitizeNodeForPrivacy } from './filter/privacy-filter';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EditorView } from 'prosemirror-view';
|
|
2
|
+
import { RichMediaAttributes, RichMediaLayout } from '@atlaskit/adf-schema';
|
|
3
|
+
import { SnapPointsProps } from '../types';
|
|
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[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "74.
|
|
3
|
+
"version": "74.6.0",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"./hooks": "./src/hooks/index.ts",
|
|
67
67
|
"./monitoring": "./src/monitoring/index.ts",
|
|
68
68
|
"./paste": "./src/paste/index.ts",
|
|
69
|
-
"./resizer": "./src/resizer.ts"
|
|
69
|
+
"./resizer": "./src/resizer/index.ts"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@atlaskit/activity-provider": "^2.4.0",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
82
82
|
"@atlaskit/collab-provider": "^9.2.0",
|
|
83
83
|
"@atlaskit/editor-json-transformer": "^8.9.0",
|
|
84
|
-
"@atlaskit/editor-palette": "1.4.
|
|
84
|
+
"@atlaskit/editor-palette": "1.4.3",
|
|
85
85
|
"@atlaskit/editor-shared-styles": "^2.4.0",
|
|
86
86
|
"@atlaskit/emoji": "^67.4.0",
|
|
87
87
|
"@atlaskit/icon": "^21.12.0",
|
|
@@ -135,17 +135,18 @@
|
|
|
135
135
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
136
136
|
},
|
|
137
137
|
"devDependencies": {
|
|
138
|
-
"@atlaskit/editor-core": "^185.
|
|
138
|
+
"@atlaskit/editor-core": "^185.2.0",
|
|
139
139
|
"@atlaskit/editor-json-transformer": "^8.9.0",
|
|
140
|
-
"@atlaskit/editor-plugin-analytics": "^0.0.
|
|
141
|
-
"@atlaskit/editor-plugin-content-insertion": "^0.0.
|
|
140
|
+
"@atlaskit/editor-plugin-analytics": "^0.0.2",
|
|
141
|
+
"@atlaskit/editor-plugin-content-insertion": "^0.0.2",
|
|
142
142
|
"@atlaskit/editor-plugin-decorations": "^0.1.0",
|
|
143
143
|
"@atlaskit/editor-plugin-feature-flags": "^0.1.0",
|
|
144
144
|
"@atlaskit/editor-plugin-grid": "^0.1.0",
|
|
145
145
|
"@atlaskit/editor-plugin-table": "^1.5.0",
|
|
146
146
|
"@atlaskit/editor-plugin-width": "^0.1.0",
|
|
147
|
-
"@atlaskit/editor-test-helpers": "^18.
|
|
147
|
+
"@atlaskit/editor-test-helpers": "^18.6.0",
|
|
148
148
|
"@atlaskit/media-core": "^34.1.0",
|
|
149
|
+
"@atlaskit/media-test-helpers": "^33.0.0",
|
|
149
150
|
"@atlaskit/util-data-test": "^17.8.0",
|
|
150
151
|
"@atlaskit/visual-regression": "*",
|
|
151
152
|
"@atlaskit/webdriver-runner": "*",
|
package/resizer/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common/resizer",
|
|
3
|
-
"main": "../dist/cjs/resizer.js",
|
|
4
|
-
"module": "../dist/esm/resizer.js",
|
|
5
|
-
"module:es2019": "../dist/es2019/resizer.js",
|
|
3
|
+
"main": "../dist/cjs/resizer/index.js",
|
|
4
|
+
"module": "../dist/esm/resizer/index.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/resizer/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/resizer.d.ts",
|
|
7
|
+
"types": "../dist/types/resizer/index.d.ts",
|
|
8
8
|
"typesVersions": {
|
|
9
9
|
">=4.5 <4.9": {
|
|
10
10
|
"*": [
|
|
11
|
-
"../dist/types-ts4.5/resizer.d.ts"
|
|
11
|
+
"../dist/types-ts4.5/resizer/index.d.ts"
|
|
12
12
|
]
|
|
13
13
|
}
|
|
14
14
|
}
|
package/dist/es2019/resizer.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as ResizerNext } from './ui/Resizer';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const handleSides = ['left', 'right'];
|
package/dist/esm/resizer.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as ResizerNext } from './ui/Resizer';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export var handleSides = ['left', 'right'];
|
package/dist/types/resizer.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const handleSides: Array<'left' | 'right'>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const handleSides: Array<'left' | 'right'>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|