@atlaskit/editor-common 74.1.1 → 74.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/dist/cjs/i18n/en_ZZ.js +2 -17
- package/dist/cjs/i18n/ja.js +4 -4
- package/dist/cjs/i18n/nl.js +11 -11
- package/dist/cjs/i18n/pt_BR.js +2 -2
- package/dist/cjs/i18n/uk.js +11 -11
- package/dist/cjs/i18n/zh.js +3 -3
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/styles/index.js +14 -1
- package/dist/cjs/styles/shared/grid.js +16 -0
- package/dist/cjs/styles/shared/resizer.js +14 -2
- package/dist/cjs/ui/ContextPanel/context.js +89 -0
- package/dist/cjs/ui/DropList/index.js +3 -3
- package/dist/cjs/ui/Resizer/index.js +8 -1
- package/dist/cjs/ui/index.js +25 -0
- package/dist/cjs/utils/grid.js +10 -0
- package/dist/cjs/utils/index.js +7 -0
- package/dist/cjs/utils/validator.js +2 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/i18n/en_ZZ.js +2 -17
- package/dist/es2019/i18n/ja.js +4 -4
- package/dist/es2019/i18n/nl.js +11 -11
- package/dist/es2019/i18n/pt_BR.js +2 -2
- package/dist/es2019/i18n/uk.js +11 -11
- package/dist/es2019/i18n/zh.js +3 -3
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/styles/index.js +2 -1
- package/dist/es2019/styles/shared/grid.js +36 -0
- package/dist/es2019/styles/shared/resizer.js +23 -0
- package/dist/es2019/ui/ContextPanel/context.js +65 -0
- package/dist/es2019/ui/DropList/index.js +2 -4
- package/dist/es2019/ui/Resizer/index.js +8 -2
- package/dist/es2019/ui/index.js +2 -1
- package/dist/es2019/utils/grid.js +1 -0
- package/dist/es2019/utils/index.js +2 -1
- package/dist/es2019/utils/validator.js +2 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/i18n/en_ZZ.js +2 -17
- package/dist/esm/i18n/ja.js +4 -4
- package/dist/esm/i18n/nl.js +11 -11
- package/dist/esm/i18n/pt_BR.js +2 -2
- package/dist/esm/i18n/uk.js +11 -11
- package/dist/esm/i18n/zh.js +3 -3
- package/dist/esm/index.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/styles/index.js +2 -1
- package/dist/esm/styles/shared/grid.js +7 -0
- package/dist/esm/styles/shared/resizer.js +9 -1
- package/dist/esm/ui/ContextPanel/context.js +79 -0
- package/dist/esm/ui/DropList/index.js +3 -3
- package/dist/esm/ui/Resizer/index.js +9 -2
- package/dist/esm/ui/index.js +2 -1
- package/dist/esm/utils/grid.js +3 -0
- package/dist/esm/utils/index.js +2 -1
- package/dist/esm/utils/validator.js +2 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/analytics/types/events.d.ts +1 -1
- package/dist/types/i18n/en_ZZ.d.ts +2 -17
- package/dist/types/provider-factory/types.d.ts +1 -1
- package/dist/types/resizer.d.ts +1 -0
- package/dist/types/styles/index.d.ts +1 -0
- package/dist/types/styles/shared/grid.d.ts +2 -0
- package/dist/types/styles/shared/resizer.d.ts +8 -0
- package/dist/types/types/editor-actions.d.ts +1 -1
- package/dist/types/types/grid.d.ts +1 -0
- package/dist/types/types/index.d.ts +2 -2
- package/dist/types/types/next-editor-plugin.d.ts +5 -0
- package/dist/types/ui/ContextPanel/context.d.ts +24 -0
- package/dist/types/ui/DropList/index.d.ts +1 -1
- package/dist/types/ui/Resizer/index.d.ts +2 -1
- package/dist/types/ui/Resizer/types.d.ts +1 -0
- package/dist/types/ui/index.d.ts +1 -0
- package/dist/types/ui-menu/ToolbarButton/index.d.ts +1 -1
- package/dist/types/utils/grid.d.ts +3 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types-ts4.5/analytics/types/events.d.ts +1 -1
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +2 -17
- package/dist/types-ts4.5/provider-factory/types.d.ts +1 -1
- package/dist/types-ts4.5/resizer.d.ts +1 -0
- package/dist/types-ts4.5/styles/index.d.ts +1 -0
- package/dist/types-ts4.5/styles/shared/grid.d.ts +2 -0
- package/dist/types-ts4.5/styles/shared/resizer.d.ts +8 -0
- package/dist/types-ts4.5/types/editor-actions.d.ts +1 -1
- package/dist/types-ts4.5/types/grid.d.ts +1 -0
- package/dist/types-ts4.5/types/index.d.ts +2 -2
- package/dist/types-ts4.5/types/next-editor-plugin.d.ts +5 -0
- package/dist/types-ts4.5/ui/ContextPanel/context.d.ts +24 -0
- package/dist/types-ts4.5/ui/DropList/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/Resizer/index.d.ts +2 -1
- package/dist/types-ts4.5/ui/Resizer/types.d.ts +1 -0
- package/dist/types-ts4.5/ui/index.d.ts +1 -0
- package/dist/types-ts4.5/ui-menu/ToolbarButton/index.d.ts +1 -1
- package/dist/types-ts4.5/utils/grid.d.ts +3 -0
- package/dist/types-ts4.5/utils/index.d.ts +1 -0
- package/package.json +10 -8
- package/report.api.md +1 -1
- package/collab/package.json +0 -15
- package/dist/cjs/collab/types.js +0 -5
- package/dist/cjs/types/collab.js +0 -5
- package/dist/es2019/types/collab.js +0 -1
- package/dist/esm/collab/types.js +0 -1
- package/dist/esm/collab.js +0 -1
- package/dist/esm/types/collab.js +0 -1
- package/dist/types/collab/types.d.ts +0 -101
- package/dist/types/collab.d.ts +0 -1
- package/dist/types/types/collab.d.ts +0 -8
- package/dist/types-ts4.5/collab/types.d.ts +0 -101
- package/dist/types-ts4.5/collab.d.ts +0 -1
- package/dist/types-ts4.5/types/collab.d.ts +0 -8
- /package/dist/cjs/{collab.js → types/grid.js} +0 -0
- /package/dist/es2019/{collab.js → types/grid.js} +0 -0
- /package/dist/{es2019/collab/types.js → esm/types/grid.js} +0 -0
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
declare const _default: {
|
|
8
8
|
'fabric.editor.action': string;
|
|
9
9
|
'fabric.editor.action.description': string;
|
|
10
|
-
'fabric.editor.addMediaFiles': string;
|
|
11
10
|
'fabric.editor.alignImageCenter': string;
|
|
12
11
|
'fabric.editor.alignImageLeft': string;
|
|
13
12
|
'fabric.editor.alignImageRight': string;
|
|
@@ -36,6 +35,8 @@ declare const _default: {
|
|
|
36
35
|
'fabric.editor.expandPlaceholder': string;
|
|
37
36
|
'fabric.editor.feedbackDialog': string;
|
|
38
37
|
'fabric.editor.feedbackDialog.description': string;
|
|
38
|
+
'fabric.editor.filesAndImages': string;
|
|
39
|
+
'fabric.editor.filesAndImages.description': string;
|
|
39
40
|
'fabric.editor.help': string;
|
|
40
41
|
'fabric.editor.help.description': string;
|
|
41
42
|
'fabric.editor.horizontalRule': string;
|
|
@@ -47,8 +48,6 @@ declare const _default: {
|
|
|
47
48
|
'fabric.editor.layoutWide': string;
|
|
48
49
|
'fabric.editor.link': string;
|
|
49
50
|
'fabric.editor.link.description': string;
|
|
50
|
-
'fabric.editor.mediaFiles': string;
|
|
51
|
-
'fabric.editor.mediaFiles.description': string;
|
|
52
51
|
'fabric.editor.mention': string;
|
|
53
52
|
'fabric.editor.mention.description': string;
|
|
54
53
|
'fabric.editor.openLink': string;
|
|
@@ -76,20 +75,12 @@ declare const _default: {
|
|
|
76
75
|
'fabric.editor.viewMore': string;
|
|
77
76
|
'fabric.editor.visit': string;
|
|
78
77
|
'fabric.theme.blue': string;
|
|
79
|
-
'fabric.theme.bold-blue': string;
|
|
80
|
-
'fabric.theme.bold-green': string;
|
|
81
|
-
'fabric.theme.bold-orange': string;
|
|
82
|
-
'fabric.theme.bold-purple': string;
|
|
83
|
-
'fabric.theme.bold-red': string;
|
|
84
|
-
'fabric.theme.bold-teal': string;
|
|
85
78
|
'fabric.theme.dark-blue': string;
|
|
86
|
-
'fabric.theme.dark-gray': string;
|
|
87
79
|
'fabric.theme.dark-green': string;
|
|
88
80
|
'fabric.theme.dark-purple': string;
|
|
89
81
|
'fabric.theme.dark-red': string;
|
|
90
82
|
'fabric.theme.dark-teal': string;
|
|
91
83
|
'fabric.theme.dark-yellow': string;
|
|
92
|
-
'fabric.theme.default': string;
|
|
93
84
|
'fabric.theme.gray': string;
|
|
94
85
|
'fabric.theme.green': string;
|
|
95
86
|
'fabric.theme.light-blue': string;
|
|
@@ -102,12 +93,6 @@ declare const _default: {
|
|
|
102
93
|
'fabric.theme.orange': string;
|
|
103
94
|
'fabric.theme.purple': string;
|
|
104
95
|
'fabric.theme.red': string;
|
|
105
|
-
'fabric.theme.subtle-blue': string;
|
|
106
|
-
'fabric.theme.subtle-green': string;
|
|
107
|
-
'fabric.theme.subtle-purple': string;
|
|
108
|
-
'fabric.theme.subtle-red': string;
|
|
109
|
-
'fabric.theme.subtle-teal': string;
|
|
110
|
-
'fabric.theme.subtle-yellow': string;
|
|
111
96
|
'fabric.theme.teal': string;
|
|
112
97
|
'fabric.theme.white': string;
|
|
113
98
|
'fabric.theme.yellow': string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ActivityProvider } from '@atlaskit/activity-provider';
|
|
2
|
+
import type { CollabEditProvider } from '@atlaskit/collab-provider';
|
|
2
3
|
import type { EmojiProvider } from '@atlaskit/emoji/types';
|
|
3
4
|
import { MentionProvider } from '@atlaskit/mention/types';
|
|
4
5
|
import { TaskDecisionProvider } from '@atlaskit/task-decision/types';
|
|
5
|
-
import { CollabEditProvider } from '../collab/types';
|
|
6
6
|
import { ExtensionProvider } from '../extensions/types';
|
|
7
7
|
import { AutoformattingProvider } from './autoformatting-provider';
|
|
8
8
|
import { CardProvider } from './card-provider';
|
|
@@ -23,3 +23,4 @@ export { CodeBlockSharedCssClassName, codeBlockSharedStyles, codeBlockInListSafa
|
|
|
23
23
|
export { LAYOUT_SECTION_MARGIN, LAYOUT_COLUMN_PADDING } from './shared/layout';
|
|
24
24
|
export { EXTENSION_PADDING, BODIED_EXT_PADDING } from './shared/extension';
|
|
25
25
|
export { resizerStyles } from './shared/resizer';
|
|
26
|
+
export { gridStyles, GRID_GUTTER } from './shared/grid';
|
|
@@ -3,4 +3,12 @@ export declare const resizerHandleRightClassName = "resizer-handle-right";
|
|
|
3
3
|
export declare const resizerHandleLeftClassName = "resizer-handle-left";
|
|
4
4
|
export declare const resizerHandlePadding = 13;
|
|
5
5
|
export declare const resizerHandleZIndex = 99;
|
|
6
|
+
export declare const resizerHandlerSmallClassName = "resizer-handler-small";
|
|
7
|
+
export declare const resizerHandlerMediumClassName = "resizer-handler-medium";
|
|
8
|
+
export declare const resizerHandlerLargeClassName = "resizer-handler-large";
|
|
9
|
+
export declare const resizerHandlerClassName: {
|
|
10
|
+
small: string;
|
|
11
|
+
medium: string;
|
|
12
|
+
large: string;
|
|
13
|
+
};
|
|
6
14
|
export declare const resizerStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Node } from 'prosemirror-model';
|
|
2
2
|
import { EditorView } from 'prosemirror-view';
|
|
3
|
+
import type { ResolvedEditorState } from '@atlaskit/collab-provider/types';
|
|
3
4
|
import { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
4
|
-
import { ResolvedEditorState } from '../collab';
|
|
5
5
|
import { EventDispatcher } from '../event-dispatcher';
|
|
6
6
|
export type ContextUpdateHandler = (editorView: EditorView, eventDispatcher: EventDispatcher) => void;
|
|
7
7
|
export type ReplaceRawValue = Node | object | string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type GridType = 'full' | 'wrapped';
|
|
@@ -12,7 +12,6 @@ export { AnnotationUpdateEmitter, AnnotationUpdateEvent } from './annotation';
|
|
|
12
12
|
export type { AnnotationState, AnnotationProviders, AnnotationUpdateEventPayloads, InlineCommentSelectionComponentProps, InlineCommentViewComponentProps, InlineCommentAnnotationProvider, OnAnnotationClickPayload, AnnotationByMatches, AnnotationActionResult, } from './annotation';
|
|
13
13
|
export type { ContextUpdateHandler, EditorActionsOptions, ReplaceRawValue, } from './editor-actions';
|
|
14
14
|
export type { TypeAheadStats, TypeAheadItemRenderProps, TypeAheadInsert, TypeAheadSelectItem, TypeAheadItem, TypeAheadForceSelect, TypeAheadHandler, } from './type-ahead';
|
|
15
|
-
export type { NewCollabSyncUpErrorAttributes, SyncUpErrorFunction, } from './collab';
|
|
16
15
|
export type { CommandDispatch, Command, HigherOrderCommand } from './command';
|
|
17
16
|
export type { FeatureFlags, FeatureFlagKey, GetEditorFeatureFlags, } from './feature-flags';
|
|
18
17
|
export type { Browsers, Range, DisableSpellcheckByBrowser, } from './supported-browsers';
|
|
@@ -29,8 +28,9 @@ export type { EditorReactContext } from './editor-react-context';
|
|
|
29
28
|
export type { PMPluginFactoryParams, PMPluginFactory, PMPlugin, } from './plugin-factory';
|
|
30
29
|
export type { NodeConfig, MarkConfig, NodeViewConfig, } from './prosemirror-config';
|
|
31
30
|
export type { PluginsOptions, EditorPlugin, getPosHandler, getPosHandlerNode, } from './editor-plugin';
|
|
32
|
-
export type { NextEditorPlugin, AllEditorPresetPluginTypes, PluginDependenciesAPI, ExtractPluginNameFromAllBuilderPlugins, SafePresetCheck, DefaultEditorPlugin, OptionalPlugin, PluginInjectionAPI, CreatePluginDependenciesAPI, NextEditorPluginMetadata, ExtractInjectionAPI, ExtractPluginActions, } from './next-editor-plugin';
|
|
31
|
+
export type { NextEditorPlugin, AllEditorPresetPluginTypes, PluginDependenciesAPI, ExtractPluginNameFromAllBuilderPlugins, SafePresetCheck, DefaultEditorPlugin, OptionalPlugin, PluginInjectionAPI, CreatePluginDependenciesAPI, NextEditorPluginMetadata, ExtractInjectionAPI, ExtractPluginActions, PluginInjectionAPIWithDependency, } from './next-editor-plugin';
|
|
33
32
|
export type IconProps = {
|
|
34
33
|
label?: string;
|
|
35
34
|
};
|
|
36
35
|
export type { TTITracking, TransactionTracking, UITracking, CatchAllTracking, NodeViewTracking, BrowserFreezetracking, ProseMirrorRenderedTracking, InputTracking, ContentRetrievalTracking, OnChangeCallbackTracking, OnEditorReadyCallbackTracking, PasteTracking, RenderTracking, PerformanceTracking, } from './performance-tracking';
|
|
36
|
+
export type { GridType } from './grid';
|
|
@@ -32,6 +32,11 @@ export type PluginInjectionAPI<Name extends string, Metadata extends NextEditorP
|
|
|
32
32
|
...ExtractPluginDependenciesFromMetadata<Metadata>
|
|
33
33
|
]>;
|
|
34
34
|
};
|
|
35
|
+
export type PluginInjectionAPIWithDependency<Plugin> = Plugin extends NextEditorPlugin<infer Name, infer Metadata> ? {
|
|
36
|
+
dependencies: CreatePluginDependenciesAPI<[
|
|
37
|
+
NextEditorPlugin<Name, Metadata>
|
|
38
|
+
]>;
|
|
39
|
+
} : never;
|
|
35
40
|
type NextEditorPluginFunctionDefinition<Name extends string, Metadata extends NextEditorPluginMetadata, Configuration> = (config: Configuration, api?: PluginInjectionAPI<Name, Metadata>) => DefaultEditorPlugin<Name, Metadata>;
|
|
36
41
|
type NextEditorPluginFunctionOptionalConfigDefinition<Name extends string, Metadata extends NextEditorPluginMetadata, Configuration = undefined> = (config?: Configuration, api?: PluginInjectionAPI<Name, Metadata>) => DefaultEditorPlugin<Name, Metadata>;
|
|
37
42
|
type OptionalPrivateProperty = {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type ContextPanelContext = {
|
|
3
|
+
width: number;
|
|
4
|
+
positionedOverEditor: boolean;
|
|
5
|
+
broadcastWidth: (width: number) => void;
|
|
6
|
+
broadcastPosition: (positionedOverEditor: boolean) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const ContextPanel: React.Context<ContextPanelContext>;
|
|
9
|
+
export type ContextPanelProviderState = {
|
|
10
|
+
width?: number;
|
|
11
|
+
positionedOverEditor?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare class ContextPanelWidthProvider extends React.Component<any, ContextPanelProviderState> {
|
|
14
|
+
state: {
|
|
15
|
+
width: number;
|
|
16
|
+
positionedOverEditor: boolean;
|
|
17
|
+
};
|
|
18
|
+
constructor(props: any);
|
|
19
|
+
broadcastSidebarWidth: (width: number) => void;
|
|
20
|
+
broadcastPosition: (positionedOverEditor: boolean) => void;
|
|
21
|
+
render(): JSX.Element;
|
|
22
|
+
}
|
|
23
|
+
declare const Provider: React.Provider<ContextPanelContext>, Consumer: React.Consumer<ContextPanelContext>;
|
|
24
|
+
export { Provider as ContextPanelProvider, Consumer as ContextPanelConsumer };
|
|
@@ -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" | "
|
|
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" | "isOpen" | "shouldFitContainer" | "onPositioned" | "onOpenChange"> & import("react").RefAttributes<any>>;
|
|
20
20
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { HandleComponent } from 're-resizable';
|
|
3
|
-
import { EnabledHandles, HandleResize } from './types';
|
|
3
|
+
import { EnabledHandles, HandleResize, HandlerHeightSizeType } from './types';
|
|
4
4
|
export interface ResizableNumberSize {
|
|
5
5
|
width: number;
|
|
6
6
|
height: number;
|
|
@@ -18,5 +18,6 @@ export type ResizerProps = {
|
|
|
18
18
|
maxWidth?: number;
|
|
19
19
|
handleWrapperStyle?: React.CSSProperties;
|
|
20
20
|
handleComponent?: HandleComponent;
|
|
21
|
+
handlerHeightSize?: HandlerHeightSizeType;
|
|
21
22
|
};
|
|
22
23
|
export default function ResizerNext(props: PropsWithChildren<ResizerProps>): JSX.Element;
|
|
@@ -26,3 +26,4 @@ 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 { ContextPanelProvider, ContextPanelWidthProvider, ContextPanelConsumer, ContextPanel, } from './ContextPanel/context';
|
|
@@ -42,7 +42,7 @@ declare const ToolbarButton: React.ForwardRefExoticComponent<{
|
|
|
42
42
|
onItemClick?: ((item: MenuItem) => void) | undefined;
|
|
43
43
|
onKeyDown?: ((event: React.KeyboardEvent<HTMLElement>) => void) | undefined;
|
|
44
44
|
selected?: boolean | undefined;
|
|
45
|
-
spacing?: "
|
|
45
|
+
spacing?: "default" | "none" | "compact" | undefined;
|
|
46
46
|
target?: string | undefined;
|
|
47
47
|
title?: React.ReactNode;
|
|
48
48
|
titlePosition?: PositionType | undefined;
|
|
@@ -49,3 +49,4 @@ export { isReferencedSource, removeConnectedNodes, getChildrenInfo, getNodeName,
|
|
|
49
49
|
export { getItemCounterDigitsSize, getOrderFromOrderedListNode, resolveOrder, isListNode, isParagraphNode, isListItemNode, isBulletList, } from './list';
|
|
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
|
+
export { gridTypeForLayout } from './grid';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "74.
|
|
3
|
+
"version": "74.2.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/"
|
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
"releaseModel": "scheduled"
|
|
29
29
|
},
|
|
30
30
|
"af:exports": {
|
|
31
|
-
"./collab": "./src/collab.ts",
|
|
32
31
|
"./event-dispatcher": "./src/event-dispatcher/index.ts",
|
|
33
32
|
"./extensions": "./src/extensions.ts",
|
|
34
33
|
"./normalize-feature-flags": "./src/normalize-feature-flags.ts",
|
|
@@ -71,7 +70,7 @@
|
|
|
71
70
|
},
|
|
72
71
|
"dependencies": {
|
|
73
72
|
"@atlaskit/activity-provider": "^2.4.0",
|
|
74
|
-
"@atlaskit/adf-schema": "^25.
|
|
73
|
+
"@atlaskit/adf-schema": "^25.7.0",
|
|
75
74
|
"@atlaskit/adf-utils": "^18.2.0",
|
|
76
75
|
"@atlaskit/analytics-listeners": "^8.7.0",
|
|
77
76
|
"@atlaskit/analytics-namespaced-context": "^6.7.0",
|
|
@@ -80,20 +79,21 @@
|
|
|
80
79
|
"@atlaskit/button": "^16.7.0",
|
|
81
80
|
"@atlaskit/code": "^14.6.0",
|
|
82
81
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
82
|
+
"@atlaskit/collab-provider": "^9.0.0",
|
|
83
83
|
"@atlaskit/editor-json-transformer": "^8.9.0",
|
|
84
84
|
"@atlaskit/editor-palette": "1.4.2",
|
|
85
85
|
"@atlaskit/editor-shared-styles": "^2.4.0",
|
|
86
86
|
"@atlaskit/emoji": "^67.4.0",
|
|
87
87
|
"@atlaskit/icon": "^21.12.0",
|
|
88
88
|
"@atlaskit/in-product-testing": "^0.2.0",
|
|
89
|
-
"@atlaskit/media-card": "^
|
|
89
|
+
"@atlaskit/media-card": "^76.0.0",
|
|
90
90
|
"@atlaskit/media-client": "^22.0.0",
|
|
91
91
|
"@atlaskit/media-picker": "^65.1.0",
|
|
92
92
|
"@atlaskit/mention": "^22.1.0",
|
|
93
93
|
"@atlaskit/menu": "^1.7.0",
|
|
94
94
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
95
95
|
"@atlaskit/profilecard": "^19.3.0",
|
|
96
|
-
"@atlaskit/smart-card": "^26.
|
|
96
|
+
"@atlaskit/smart-card": "^26.3.0",
|
|
97
97
|
"@atlaskit/smart-user-picker": "^6.1.0",
|
|
98
98
|
"@atlaskit/task-decision": "^17.6.0",
|
|
99
99
|
"@atlaskit/theme": "^12.5.0",
|
|
@@ -135,13 +135,15 @@
|
|
|
135
135
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
136
136
|
},
|
|
137
137
|
"devDependencies": {
|
|
138
|
-
"@atlaskit/editor-core": "^
|
|
138
|
+
"@atlaskit/editor-core": "^184.0.0",
|
|
139
139
|
"@atlaskit/editor-json-transformer": "^8.9.0",
|
|
140
140
|
"@atlaskit/editor-plugin-analytics": "^0.0.1",
|
|
141
141
|
"@atlaskit/editor-plugin-content-insertion": "^0.0.1",
|
|
142
142
|
"@atlaskit/editor-plugin-feature-flags": "^0.1.0",
|
|
143
|
-
"@atlaskit/editor-plugin-
|
|
144
|
-
"@atlaskit/editor-
|
|
143
|
+
"@atlaskit/editor-plugin-grid": "^0.1.0",
|
|
144
|
+
"@atlaskit/editor-plugin-table": "^1.5.0",
|
|
145
|
+
"@atlaskit/editor-plugin-width": "^0.0.1",
|
|
146
|
+
"@atlaskit/editor-test-helpers": "^18.4.0",
|
|
145
147
|
"@atlaskit/media-core": "^34.1.0",
|
|
146
148
|
"@atlaskit/util-data-test": "^17.8.0",
|
|
147
149
|
"@atlaskit/visual-regression": "*",
|
package/report.api.md
CHANGED
package/collab/package.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@atlaskit/editor-common/collab",
|
|
3
|
-
"main": "../dist/cjs/collab.js",
|
|
4
|
-
"module": "../dist/esm/collab.js",
|
|
5
|
-
"module:es2019": "../dist/es2019/collab.js",
|
|
6
|
-
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/collab.d.ts",
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <4.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/collab.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
package/dist/cjs/collab/types.js
DELETED
package/dist/cjs/types/collab.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/esm/collab/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/esm/collab.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/esm/types/collab.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { EditorState, Transaction } from 'prosemirror-state';
|
|
2
|
-
import { Step } from 'prosemirror-transform';
|
|
3
|
-
import { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
4
|
-
import { SyncUpErrorFunction } from '../types';
|
|
5
|
-
export interface CollabParticipant {
|
|
6
|
-
lastActive: number;
|
|
7
|
-
sessionId: string;
|
|
8
|
-
avatar: string;
|
|
9
|
-
name: string;
|
|
10
|
-
cursorPos?: number;
|
|
11
|
-
}
|
|
12
|
-
export interface CollabEventInitData {
|
|
13
|
-
doc?: any;
|
|
14
|
-
json?: any;
|
|
15
|
-
version?: number;
|
|
16
|
-
sid?: string;
|
|
17
|
-
reserveCursor?: boolean;
|
|
18
|
-
}
|
|
19
|
-
export interface CollabEventRemoteData {
|
|
20
|
-
json?: any;
|
|
21
|
-
newState?: EditorState;
|
|
22
|
-
userIds?: (number | string)[];
|
|
23
|
-
}
|
|
24
|
-
export interface CollabEventConnectionData {
|
|
25
|
-
sid: string;
|
|
26
|
-
initial: boolean;
|
|
27
|
-
}
|
|
28
|
-
export interface CollabEventConnectingData {
|
|
29
|
-
initial: boolean;
|
|
30
|
-
}
|
|
31
|
-
export interface CollabEventDisconnectedData {
|
|
32
|
-
sid: string;
|
|
33
|
-
reason: 'CLIENT_DISCONNECT' | 'SERVER_DISCONNECT' | 'SOCKET_CLOSED' | 'SOCKET_ERROR' | 'SOCKET_TIMEOUT' | 'UNKNOWN_DISCONNECT';
|
|
34
|
-
}
|
|
35
|
-
export interface CollabEventPresenceData {
|
|
36
|
-
joined?: CollabParticipant[];
|
|
37
|
-
left?: {
|
|
38
|
-
sessionId: string;
|
|
39
|
-
}[];
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* @deprecated use CollabTelepointerPayload from "@atlaskit/collab-provider"
|
|
43
|
-
*/
|
|
44
|
-
export interface CollabEventTelepointerData {
|
|
45
|
-
type: 'telepointer';
|
|
46
|
-
selection: CollabSendableSelection;
|
|
47
|
-
sessionId: string;
|
|
48
|
-
}
|
|
49
|
-
export interface CollabEventLocalStepData {
|
|
50
|
-
steps: Array<Step>;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* @deprecated use CollabSendableSelection from "@atlaskit/collab-provider"
|
|
54
|
-
*/
|
|
55
|
-
export interface CollabSendableSelection {
|
|
56
|
-
type: 'textSelection' | 'nodeSelection';
|
|
57
|
-
anchor: number;
|
|
58
|
-
head: number;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* @deprecated use keyof CollabEvents from "@atlaskit/collab-provider"
|
|
62
|
-
*/
|
|
63
|
-
export type CollabEvent = keyof CollabEventData;
|
|
64
|
-
/**
|
|
65
|
-
* @deprecated use CollabEvents from "@atlaskit/collab-provider"
|
|
66
|
-
*/
|
|
67
|
-
export interface CollabEventData {
|
|
68
|
-
init: CollabEventInitData;
|
|
69
|
-
connected: CollabEventConnectionData;
|
|
70
|
-
disconnected: CollabEventDisconnectedData;
|
|
71
|
-
data: CollabEventRemoteData;
|
|
72
|
-
telepointer: CollabEventTelepointerData;
|
|
73
|
-
presence: CollabEventPresenceData;
|
|
74
|
-
error: any;
|
|
75
|
-
'local-steps': any;
|
|
76
|
-
entity: any;
|
|
77
|
-
connecting: CollabEventConnectingData;
|
|
78
|
-
}
|
|
79
|
-
export type ResolvedEditorState<T = any> = {
|
|
80
|
-
content: JSONDocNode | T;
|
|
81
|
-
title: string | null;
|
|
82
|
-
stepVersion: number;
|
|
83
|
-
};
|
|
84
|
-
/**
|
|
85
|
-
* @deprecated use CollabEditProvider from "@atlaskit/collab-provider"
|
|
86
|
-
*/
|
|
87
|
-
export interface CollabEditProvider<Events extends CollabEventData = CollabEventData> {
|
|
88
|
-
initialize(getState: () => any, createStep: (json: object) => Step): this;
|
|
89
|
-
setup(props: {
|
|
90
|
-
getState: () => EditorState;
|
|
91
|
-
onSyncUpError?: SyncUpErrorFunction;
|
|
92
|
-
}): this;
|
|
93
|
-
send(tr: Transaction, oldState: EditorState, newState: EditorState): void;
|
|
94
|
-
on(evt: keyof Events, handler: (...args: any) => void): this;
|
|
95
|
-
off(evt: keyof Events, handler: (...args: any) => void): this;
|
|
96
|
-
unsubscribeAll(evt: keyof Events): this;
|
|
97
|
-
sendMessage<K extends keyof Events>(data: {
|
|
98
|
-
type: K;
|
|
99
|
-
} & Events[K]): void;
|
|
100
|
-
getFinalAcknowledgedState(): Promise<ResolvedEditorState>;
|
|
101
|
-
}
|
package/dist/types/collab.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { CollabEditProvider, CollabEventPresenceData, CollabEvent, CollabEventConnectionData, CollabEventDisconnectedData, CollabEventData, CollabEventInitData, CollabEventRemoteData, CollabEventTelepointerData, CollabParticipant, CollabSendableSelection, CollabEventLocalStepData, ResolvedEditorState, CollabEventConnectingData, } from './collab/types';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export type NewCollabSyncUpErrorAttributes = {
|
|
2
|
-
lengthOfUnconfirmedSteps?: number;
|
|
3
|
-
tries: number;
|
|
4
|
-
maxRetries: number;
|
|
5
|
-
clientId?: number | string;
|
|
6
|
-
version: number;
|
|
7
|
-
};
|
|
8
|
-
export type SyncUpErrorFunction = (attributes: NewCollabSyncUpErrorAttributes) => void;
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { EditorState, Transaction } from 'prosemirror-state';
|
|
2
|
-
import { Step } from 'prosemirror-transform';
|
|
3
|
-
import { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
4
|
-
import { SyncUpErrorFunction } from '../types';
|
|
5
|
-
export interface CollabParticipant {
|
|
6
|
-
lastActive: number;
|
|
7
|
-
sessionId: string;
|
|
8
|
-
avatar: string;
|
|
9
|
-
name: string;
|
|
10
|
-
cursorPos?: number;
|
|
11
|
-
}
|
|
12
|
-
export interface CollabEventInitData {
|
|
13
|
-
doc?: any;
|
|
14
|
-
json?: any;
|
|
15
|
-
version?: number;
|
|
16
|
-
sid?: string;
|
|
17
|
-
reserveCursor?: boolean;
|
|
18
|
-
}
|
|
19
|
-
export interface CollabEventRemoteData {
|
|
20
|
-
json?: any;
|
|
21
|
-
newState?: EditorState;
|
|
22
|
-
userIds?: (number | string)[];
|
|
23
|
-
}
|
|
24
|
-
export interface CollabEventConnectionData {
|
|
25
|
-
sid: string;
|
|
26
|
-
initial: boolean;
|
|
27
|
-
}
|
|
28
|
-
export interface CollabEventConnectingData {
|
|
29
|
-
initial: boolean;
|
|
30
|
-
}
|
|
31
|
-
export interface CollabEventDisconnectedData {
|
|
32
|
-
sid: string;
|
|
33
|
-
reason: 'CLIENT_DISCONNECT' | 'SERVER_DISCONNECT' | 'SOCKET_CLOSED' | 'SOCKET_ERROR' | 'SOCKET_TIMEOUT' | 'UNKNOWN_DISCONNECT';
|
|
34
|
-
}
|
|
35
|
-
export interface CollabEventPresenceData {
|
|
36
|
-
joined?: CollabParticipant[];
|
|
37
|
-
left?: {
|
|
38
|
-
sessionId: string;
|
|
39
|
-
}[];
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* @deprecated use CollabTelepointerPayload from "@atlaskit/collab-provider"
|
|
43
|
-
*/
|
|
44
|
-
export interface CollabEventTelepointerData {
|
|
45
|
-
type: 'telepointer';
|
|
46
|
-
selection: CollabSendableSelection;
|
|
47
|
-
sessionId: string;
|
|
48
|
-
}
|
|
49
|
-
export interface CollabEventLocalStepData {
|
|
50
|
-
steps: Array<Step>;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* @deprecated use CollabSendableSelection from "@atlaskit/collab-provider"
|
|
54
|
-
*/
|
|
55
|
-
export interface CollabSendableSelection {
|
|
56
|
-
type: 'textSelection' | 'nodeSelection';
|
|
57
|
-
anchor: number;
|
|
58
|
-
head: number;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* @deprecated use keyof CollabEvents from "@atlaskit/collab-provider"
|
|
62
|
-
*/
|
|
63
|
-
export type CollabEvent = keyof CollabEventData;
|
|
64
|
-
/**
|
|
65
|
-
* @deprecated use CollabEvents from "@atlaskit/collab-provider"
|
|
66
|
-
*/
|
|
67
|
-
export interface CollabEventData {
|
|
68
|
-
init: CollabEventInitData;
|
|
69
|
-
connected: CollabEventConnectionData;
|
|
70
|
-
disconnected: CollabEventDisconnectedData;
|
|
71
|
-
data: CollabEventRemoteData;
|
|
72
|
-
telepointer: CollabEventTelepointerData;
|
|
73
|
-
presence: CollabEventPresenceData;
|
|
74
|
-
error: any;
|
|
75
|
-
'local-steps': any;
|
|
76
|
-
entity: any;
|
|
77
|
-
connecting: CollabEventConnectingData;
|
|
78
|
-
}
|
|
79
|
-
export type ResolvedEditorState<T = any> = {
|
|
80
|
-
content: JSONDocNode | T;
|
|
81
|
-
title: string | null;
|
|
82
|
-
stepVersion: number;
|
|
83
|
-
};
|
|
84
|
-
/**
|
|
85
|
-
* @deprecated use CollabEditProvider from "@atlaskit/collab-provider"
|
|
86
|
-
*/
|
|
87
|
-
export interface CollabEditProvider<Events extends CollabEventData = CollabEventData> {
|
|
88
|
-
initialize(getState: () => any, createStep: (json: object) => Step): this;
|
|
89
|
-
setup(props: {
|
|
90
|
-
getState: () => EditorState;
|
|
91
|
-
onSyncUpError?: SyncUpErrorFunction;
|
|
92
|
-
}): this;
|
|
93
|
-
send(tr: Transaction, oldState: EditorState, newState: EditorState): void;
|
|
94
|
-
on(evt: keyof Events, handler: (...args: any) => void): this;
|
|
95
|
-
off(evt: keyof Events, handler: (...args: any) => void): this;
|
|
96
|
-
unsubscribeAll(evt: keyof Events): this;
|
|
97
|
-
sendMessage<K extends keyof Events>(data: {
|
|
98
|
-
type: K;
|
|
99
|
-
} & Events[K]): void;
|
|
100
|
-
getFinalAcknowledgedState(): Promise<ResolvedEditorState>;
|
|
101
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { CollabEditProvider, CollabEventPresenceData, CollabEvent, CollabEventConnectionData, CollabEventDisconnectedData, CollabEventData, CollabEventInitData, CollabEventRemoteData, CollabEventTelepointerData, CollabParticipant, CollabSendableSelection, CollabEventLocalStepData, ResolvedEditorState, CollabEventConnectingData, } from './collab/types';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export type NewCollabSyncUpErrorAttributes = {
|
|
2
|
-
lengthOfUnconfirmedSteps?: number;
|
|
3
|
-
tries: number;
|
|
4
|
-
maxRetries: number;
|
|
5
|
-
clientId?: number | string;
|
|
6
|
-
version: number;
|
|
7
|
-
};
|
|
8
|
-
export type SyncUpErrorFunction = (attributes: NewCollabSyncUpErrorAttributes) => void;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|