@atlaskit/editor-plugin-avatar-group 0.1.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 +1 -0
- package/LICENSE.md +13 -0
- package/README.md +33 -0
- package/dist/cjs/index.js +12 -0
- package/dist/cjs/messages.js +14 -0
- package/dist/cjs/plugin.js +58 -0
- package/dist/cjs/ui/AvatarGroupPluginWrapper.js +52 -0
- package/dist/cjs/ui/avatars-with-plugin-state.js +42 -0
- package/dist/cjs/ui/avatars.js +73 -0
- package/dist/cjs/ui/colored-avatar-item.js +23 -0
- package/dist/cjs/ui/index.js +16 -0
- package/dist/cjs/ui/invite-to-edit.js +48 -0
- package/dist/cjs/ui/styles.js +17 -0
- package/dist/cjs/ui/to-avatar.js +30 -0
- package/dist/es2019/index.js +1 -0
- package/dist/es2019/messages.js +8 -0
- package/dist/es2019/plugin.js +54 -0
- package/dist/es2019/ui/AvatarGroupPluginWrapper.js +57 -0
- package/dist/es2019/ui/avatars-with-plugin-state.js +38 -0
- package/dist/es2019/ui/avatars.js +66 -0
- package/dist/es2019/ui/colored-avatar-item.js +16 -0
- package/dist/es2019/ui/index.js +3 -0
- package/dist/es2019/ui/invite-to-edit.js +35 -0
- package/dist/es2019/ui/styles.js +46 -0
- package/dist/es2019/ui/to-avatar.js +16 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/messages.js +8 -0
- package/dist/esm/plugin.js +51 -0
- package/dist/esm/ui/AvatarGroupPluginWrapper.js +46 -0
- package/dist/esm/ui/avatars-with-plugin-state.js +35 -0
- package/dist/esm/ui/avatars.js +66 -0
- package/dist/esm/ui/colored-avatar-item.js +16 -0
- package/dist/esm/ui/index.js +3 -0
- package/dist/esm/ui/invite-to-edit.js +37 -0
- package/dist/esm/ui/styles.js +10 -0
- package/dist/esm/ui/to-avatar.js +23 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/messages.d.ts +7 -0
- package/dist/types/plugin.d.ts +27 -0
- package/dist/types/ui/AvatarGroupPluginWrapper.d.ts +18 -0
- package/dist/types/ui/avatars-with-plugin-state.d.ts +80 -0
- package/dist/types/ui/avatars.d.ts +20 -0
- package/dist/types/ui/colored-avatar-item.d.ts +10 -0
- package/dist/types/ui/index.d.ts +3 -0
- package/dist/types/ui/invite-to-edit.d.ts +10 -0
- package/dist/types/ui/styles.d.ts +3 -0
- package/dist/types/ui/to-avatar.d.ts +30 -0
- package/dist/types-ts4.5/index.d.ts +2 -0
- package/dist/types-ts4.5/messages.d.ts +7 -0
- package/dist/types-ts4.5/plugin.d.ts +27 -0
- package/dist/types-ts4.5/ui/AvatarGroupPluginWrapper.d.ts +18 -0
- package/dist/types-ts4.5/ui/avatars-with-plugin-state.d.ts +96 -0
- package/dist/types-ts4.5/ui/avatars.d.ts +22 -0
- package/dist/types-ts4.5/ui/colored-avatar-item.d.ts +12 -0
- package/dist/types-ts4.5/ui/index.d.ts +3 -0
- package/dist/types-ts4.5/ui/invite-to-edit.d.ts +10 -0
- package/dist/types-ts4.5/ui/styles.d.ts +3 -0
- package/dist/types-ts4.5/ui/to-avatar.d.ts +37 -0
- package/package.json +110 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
5
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
6
|
+
import type { CollabParticipant } from '@atlaskit/editor-common/collab';
|
|
7
|
+
import type { FeatureFlags, OptionalPlugin, PublicPluginAPI } from '@atlaskit/editor-common/types';
|
|
8
|
+
import type { CollabEditPlugin, ReadOnlyParticipants } from '@atlaskit/editor-plugin-collab-edit';
|
|
9
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
10
|
+
export interface AvatarsProps {
|
|
11
|
+
sessionId?: string;
|
|
12
|
+
participants: ReadOnlyParticipants | undefined;
|
|
13
|
+
editorView?: EditorView;
|
|
14
|
+
featureFlags: FeatureFlags;
|
|
15
|
+
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
|
|
16
|
+
editorAPI: PublicPluginAPI<[OptionalPlugin<CollabEditPlugin>]> | undefined;
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export declare const scrollToCollabCursor: (editorView: EditorView, participants: CollabParticipant[], sessionId: string | undefined, index: number, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => void;
|
|
20
|
+
export declare const Avatars: React.MemoExoticComponent<(props: AvatarsProps) => jsx.JSX.Element | null>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import type { OptionalPlugin, PublicPluginAPI } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { CollabEditPlugin } from '@atlaskit/editor-plugin-collab-edit';
|
|
5
|
+
export interface ColoredAvatarItemProps {
|
|
6
|
+
sessionId: string;
|
|
7
|
+
name: string;
|
|
8
|
+
api: PublicPluginAPI<[OptionalPlugin<CollabEditPlugin>]> | undefined;
|
|
9
|
+
}
|
|
10
|
+
export declare const ColoredAvatarItem: (props: ColoredAvatarItemProps) => jsx.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { InviteToEditComponentProps } from '@atlaskit/editor-common/collab';
|
|
4
|
+
export interface InviteToEditButtonProps {
|
|
5
|
+
onClick?: React.MouseEventHandler;
|
|
6
|
+
selected?: boolean;
|
|
7
|
+
Component?: React.ComponentType<InviteToEditComponentProps>;
|
|
8
|
+
title: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const InviteToEditButton: React.FC<InviteToEditButtonProps>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { AvatarProps } from '@atlaskit/avatar-group';
|
|
2
|
+
import type { CollabParticipant } from '@atlaskit/editor-common/collab';
|
|
3
|
+
import type { OptionalPlugin, PublicPluginAPI } from '@atlaskit/editor-common/types';
|
|
4
|
+
declare const _default: import("memoize-one").MemoizedFn<(participant: CollabParticipant, api: PublicPluginAPI<[OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"collabEdit", {
|
|
5
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions;
|
|
6
|
+
dependencies: [OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
7
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
8
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
9
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>, OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
10
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
11
|
+
sharedState: {
|
|
12
|
+
createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
|
|
13
|
+
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
14
|
+
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
15
|
+
};
|
|
16
|
+
dependencies: [OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
17
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
18
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
19
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>];
|
|
20
|
+
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
21
|
+
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>];
|
|
22
|
+
sharedState: import("@atlaskit/editor-plugin-collab-edit").CollabEditPluginSharedState;
|
|
23
|
+
actions: {
|
|
24
|
+
getAvatarColor: (str: string) => {
|
|
25
|
+
index: number;
|
|
26
|
+
color: import("@atlaskit/editor-common/collab").Color;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
}, import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions>>]> | undefined) => AvatarProps>;
|
|
30
|
+
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { CollabEditOptions, CollabInviteToEditProps } from '@atlaskit/editor-common/collab';
|
|
3
|
+
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
5
|
+
import type { CollabEditPlugin } from '@atlaskit/editor-plugin-collab-edit';
|
|
6
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
7
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
+
type Config = {
|
|
9
|
+
collabEdit?: CollabEditOptions;
|
|
10
|
+
takeFullWidth: boolean;
|
|
11
|
+
showAvatarGroup?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type AvatarGroupPlugin = NextEditorPlugin<'avatarGroup', {
|
|
14
|
+
pluginConfiguration: Config;
|
|
15
|
+
dependencies: [
|
|
16
|
+
OptionalPlugin<FeatureFlagsPlugin>,
|
|
17
|
+
OptionalPlugin<AnalyticsPlugin>,
|
|
18
|
+
OptionalPlugin<CollabEditPlugin>
|
|
19
|
+
];
|
|
20
|
+
actions: {
|
|
21
|
+
getToolbarItem: ({ editorView, inviteToEditHandler, isInviteToEditButtonSelected, inviteToEditComponent, }: {
|
|
22
|
+
editorView: EditorView;
|
|
23
|
+
} & CollabInviteToEditProps) => JSX.Element | null;
|
|
24
|
+
};
|
|
25
|
+
}>;
|
|
26
|
+
export declare const avatarGroupPlugin: AvatarGroupPlugin;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
|
+
import type { DispatchAnalyticsEvent, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
|
|
4
|
+
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
5
|
+
import type { ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
|
|
6
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
|
+
import type { AvatarGroupPlugin } from '../index';
|
|
8
|
+
declare const AvatarGroupPluginWrapper: (props: {
|
|
9
|
+
collabEdit?: CollabEditOptions | undefined;
|
|
10
|
+
editorView: EditorView;
|
|
11
|
+
eventDispatcher: EventDispatcher<any>;
|
|
12
|
+
dispatchAnalyticsEvent?: DispatchAnalyticsEvent | undefined;
|
|
13
|
+
takeFullWidth: boolean;
|
|
14
|
+
featureFlags: FeatureFlags;
|
|
15
|
+
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
|
|
16
|
+
editorAPI: ExtractInjectionAPI<AvatarGroupPlugin> | undefined;
|
|
17
|
+
}) => jsx.JSX.Element;
|
|
18
|
+
export default AvatarGroupPluginWrapper;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WrappedComponentProps } from 'react-intl-next';
|
|
3
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
5
|
+
import type { FeatureFlags, OptionalPlugin, PublicPluginAPI } from '@atlaskit/editor-common/types';
|
|
6
|
+
import type { CollabEditPlugin, CollabInviteToEditProps } from '@atlaskit/editor-plugin-collab-edit';
|
|
7
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
+
export type AvatarsWithPluginStateProps = {
|
|
9
|
+
editorView?: EditorView;
|
|
10
|
+
eventDispatcher?: EventDispatcher;
|
|
11
|
+
featureFlags: FeatureFlags;
|
|
12
|
+
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
|
|
13
|
+
editorAPI: PublicPluginAPI<[
|
|
14
|
+
OptionalPlugin<CollabEditPlugin>
|
|
15
|
+
]> | undefined;
|
|
16
|
+
} & CollabInviteToEditProps;
|
|
17
|
+
declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
|
|
18
|
+
editorView?: EditorView | undefined;
|
|
19
|
+
eventDispatcher?: EventDispatcher<any> | undefined;
|
|
20
|
+
featureFlags: FeatureFlags;
|
|
21
|
+
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
|
|
22
|
+
editorAPI: PublicPluginAPI<[
|
|
23
|
+
OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"collabEdit", {
|
|
24
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions;
|
|
25
|
+
dependencies: [
|
|
26
|
+
OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
27
|
+
pluginConfiguration: FeatureFlags;
|
|
28
|
+
sharedState: FeatureFlags;
|
|
29
|
+
}, FeatureFlags>>,
|
|
30
|
+
OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
31
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
32
|
+
sharedState: {
|
|
33
|
+
createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
|
|
34
|
+
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
35
|
+
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
36
|
+
};
|
|
37
|
+
dependencies: [
|
|
38
|
+
OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
39
|
+
pluginConfiguration: FeatureFlags;
|
|
40
|
+
sharedState: FeatureFlags;
|
|
41
|
+
}, FeatureFlags>>
|
|
42
|
+
];
|
|
43
|
+
actions: EditorAnalyticsAPI;
|
|
44
|
+
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>
|
|
45
|
+
];
|
|
46
|
+
sharedState: import("@atlaskit/editor-plugin-collab-edit").CollabEditPluginSharedState;
|
|
47
|
+
actions: {
|
|
48
|
+
getAvatarColor: (str: string) => {
|
|
49
|
+
index: number;
|
|
50
|
+
color: import("@atlaskit/editor-common/collab").Color;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
}, import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions>>
|
|
54
|
+
]> | undefined;
|
|
55
|
+
} & CollabInviteToEditProps & WrappedComponentProps<"intl">>> & {
|
|
56
|
+
WrappedComponent: React.ComponentType<{
|
|
57
|
+
editorView?: EditorView | undefined;
|
|
58
|
+
eventDispatcher?: EventDispatcher<any> | undefined;
|
|
59
|
+
featureFlags: FeatureFlags;
|
|
60
|
+
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
|
|
61
|
+
editorAPI: PublicPluginAPI<[
|
|
62
|
+
OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"collabEdit", {
|
|
63
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions;
|
|
64
|
+
dependencies: [
|
|
65
|
+
OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
66
|
+
pluginConfiguration: FeatureFlags;
|
|
67
|
+
sharedState: FeatureFlags;
|
|
68
|
+
}, FeatureFlags>>,
|
|
69
|
+
OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
70
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
71
|
+
sharedState: {
|
|
72
|
+
createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
|
|
73
|
+
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
74
|
+
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
75
|
+
};
|
|
76
|
+
dependencies: [
|
|
77
|
+
OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
78
|
+
pluginConfiguration: FeatureFlags;
|
|
79
|
+
sharedState: FeatureFlags;
|
|
80
|
+
}, FeatureFlags>>
|
|
81
|
+
];
|
|
82
|
+
actions: EditorAnalyticsAPI;
|
|
83
|
+
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>
|
|
84
|
+
];
|
|
85
|
+
sharedState: import("@atlaskit/editor-plugin-collab-edit").CollabEditPluginSharedState;
|
|
86
|
+
actions: {
|
|
87
|
+
getAvatarColor: (str: string) => {
|
|
88
|
+
index: number;
|
|
89
|
+
color: import("@atlaskit/editor-common/collab").Color;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
}, import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions>>
|
|
93
|
+
]> | undefined;
|
|
94
|
+
} & CollabInviteToEditProps & WrappedComponentProps<"intl">>;
|
|
95
|
+
};
|
|
96
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
5
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
6
|
+
import type { CollabParticipant } from '@atlaskit/editor-common/collab';
|
|
7
|
+
import type { FeatureFlags, OptionalPlugin, PublicPluginAPI } from '@atlaskit/editor-common/types';
|
|
8
|
+
import type { CollabEditPlugin, ReadOnlyParticipants } from '@atlaskit/editor-plugin-collab-edit';
|
|
9
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
10
|
+
export interface AvatarsProps {
|
|
11
|
+
sessionId?: string;
|
|
12
|
+
participants: ReadOnlyParticipants | undefined;
|
|
13
|
+
editorView?: EditorView;
|
|
14
|
+
featureFlags: FeatureFlags;
|
|
15
|
+
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
|
|
16
|
+
editorAPI: PublicPluginAPI<[
|
|
17
|
+
OptionalPlugin<CollabEditPlugin>
|
|
18
|
+
]> | undefined;
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
export declare const scrollToCollabCursor: (editorView: EditorView, participants: CollabParticipant[], sessionId: string | undefined, index: number, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => void;
|
|
22
|
+
export declare const Avatars: React.MemoExoticComponent<(props: AvatarsProps) => jsx.JSX.Element | null>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import type { OptionalPlugin, PublicPluginAPI } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { CollabEditPlugin } from '@atlaskit/editor-plugin-collab-edit';
|
|
5
|
+
export interface ColoredAvatarItemProps {
|
|
6
|
+
sessionId: string;
|
|
7
|
+
name: string;
|
|
8
|
+
api: PublicPluginAPI<[
|
|
9
|
+
OptionalPlugin<CollabEditPlugin>
|
|
10
|
+
]> | undefined;
|
|
11
|
+
}
|
|
12
|
+
export declare const ColoredAvatarItem: (props: ColoredAvatarItemProps) => jsx.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { InviteToEditComponentProps } from '@atlaskit/editor-common/collab';
|
|
4
|
+
export interface InviteToEditButtonProps {
|
|
5
|
+
onClick?: React.MouseEventHandler;
|
|
6
|
+
selected?: boolean;
|
|
7
|
+
Component?: React.ComponentType<InviteToEditComponentProps>;
|
|
8
|
+
title: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const InviteToEditButton: React.FC<InviteToEditButtonProps>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { AvatarProps } from '@atlaskit/avatar-group';
|
|
2
|
+
import type { CollabParticipant } from '@atlaskit/editor-common/collab';
|
|
3
|
+
import type { OptionalPlugin, PublicPluginAPI } from '@atlaskit/editor-common/types';
|
|
4
|
+
declare const _default: import("memoize-one").MemoizedFn<(participant: CollabParticipant, api: PublicPluginAPI<[
|
|
5
|
+
OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"collabEdit", {
|
|
6
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions;
|
|
7
|
+
dependencies: [
|
|
8
|
+
OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
9
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
10
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
11
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>,
|
|
12
|
+
OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
|
|
13
|
+
pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
|
|
14
|
+
sharedState: {
|
|
15
|
+
createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
|
|
16
|
+
attachAnalyticsEvent: import("@atlaskit/editor-plugin-analytics").CreateAttachPayloadIntoTransaction | null;
|
|
17
|
+
performanceTracking: import("@atlaskit/editor-common/types").PerformanceTracking | undefined;
|
|
18
|
+
};
|
|
19
|
+
dependencies: [
|
|
20
|
+
OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
21
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
22
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
23
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>
|
|
24
|
+
];
|
|
25
|
+
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
26
|
+
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>
|
|
27
|
+
];
|
|
28
|
+
sharedState: import("@atlaskit/editor-plugin-collab-edit").CollabEditPluginSharedState;
|
|
29
|
+
actions: {
|
|
30
|
+
getAvatarColor: (str: string) => {
|
|
31
|
+
index: number;
|
|
32
|
+
color: import("@atlaskit/editor-common/collab").Color;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
}, import("@atlaskit/editor-plugin-collab-edit").PrivateCollabEditOptions>>
|
|
36
|
+
]> | undefined) => AvatarProps>;
|
|
37
|
+
export default _default;
|
package/package.json
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-plugin-avatar-group",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Avatar Group plugin for @atlaskit/editor-core.",
|
|
5
|
+
"author": "Atlassian Pty Ltd",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"registry": "https://registry.npmjs.org/"
|
|
9
|
+
},
|
|
10
|
+
"atlassian": {
|
|
11
|
+
"team": "Editor: Collaboration",
|
|
12
|
+
"inPublicMirror": false,
|
|
13
|
+
"releaseModel": "continuous",
|
|
14
|
+
"website": {
|
|
15
|
+
"name": "EditorPluginAvatarGroup",
|
|
16
|
+
"category": "Components"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend",
|
|
20
|
+
"main": "dist/cjs/index.js",
|
|
21
|
+
"module": "dist/esm/index.js",
|
|
22
|
+
"module:es2019": "dist/es2019/index.js",
|
|
23
|
+
"types": "dist/types/index.d.ts",
|
|
24
|
+
"typesVersions": {
|
|
25
|
+
">=4.5 <4.9": {
|
|
26
|
+
"*": [
|
|
27
|
+
"dist/types-ts4.5/*",
|
|
28
|
+
"dist/types-ts4.5/index.d.ts"
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"sideEffects": [
|
|
33
|
+
"*.compiled.css"
|
|
34
|
+
],
|
|
35
|
+
"atlaskit:src": "src/index.ts",
|
|
36
|
+
"af:exports": {
|
|
37
|
+
".": "./src/index.ts"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@atlaskit/avatar-group": "^9.5.0",
|
|
41
|
+
"@atlaskit/editor-common": "^76.34.0",
|
|
42
|
+
"@atlaskit/editor-plugin-analytics": "^0.4.0",
|
|
43
|
+
"@atlaskit/editor-plugin-collab-edit": "^0.1.0",
|
|
44
|
+
"@atlaskit/editor-plugin-feature-flags": "^1.0.0",
|
|
45
|
+
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
46
|
+
"@atlaskit/editor-shared-styles": "^2.9.0",
|
|
47
|
+
"@atlaskit/icon": "^22.0.0",
|
|
48
|
+
"@atlaskit/theme": "^12.6.0",
|
|
49
|
+
"@atlaskit/tokens": "^1.33.0",
|
|
50
|
+
"@babel/runtime": "^7.0.0",
|
|
51
|
+
"@emotion/react": "^11.7.1",
|
|
52
|
+
"memoize-one": "^6.0.0",
|
|
53
|
+
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"react": "^16.8.0"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@af/integration-testing": "*",
|
|
60
|
+
"@af/visual-regression": "*",
|
|
61
|
+
"@atlaskit/editor-plugin-mentions": "^0.1.0",
|
|
62
|
+
"@atlaskit/editor-plugin-type-ahead": "^0.9.0",
|
|
63
|
+
"@atlaskit/editor-test-helpers": "^18.15.0",
|
|
64
|
+
"@atlaskit/ssr": "*",
|
|
65
|
+
"@atlaskit/synchrony-test-helpers": "^2.3.0",
|
|
66
|
+
"@atlaskit/visual-regression": "*",
|
|
67
|
+
"@atlaskit/webdriver-runner": "*",
|
|
68
|
+
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
69
|
+
"@testing-library/react": "^12.1.5",
|
|
70
|
+
"react-dom": "^16.8.0",
|
|
71
|
+
"typescript": "~4.9.5",
|
|
72
|
+
"wait-for-expect": "^1.2.0"
|
|
73
|
+
},
|
|
74
|
+
"techstack": {
|
|
75
|
+
"@atlassian/frontend": {
|
|
76
|
+
"import-structure": [
|
|
77
|
+
"atlassian-conventions"
|
|
78
|
+
],
|
|
79
|
+
"circular-dependencies": [
|
|
80
|
+
"file-and-folder-level"
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
"@repo/internal": {
|
|
84
|
+
"dom-events": "use-bind-event-listener",
|
|
85
|
+
"analytics": [
|
|
86
|
+
"analytics-next"
|
|
87
|
+
],
|
|
88
|
+
"design-tokens": [
|
|
89
|
+
"color"
|
|
90
|
+
],
|
|
91
|
+
"theming": [
|
|
92
|
+
"react-context"
|
|
93
|
+
],
|
|
94
|
+
"ui-components": [
|
|
95
|
+
"lite-mode"
|
|
96
|
+
],
|
|
97
|
+
"deprecation": [
|
|
98
|
+
"no-deprecated-imports"
|
|
99
|
+
],
|
|
100
|
+
"styling": [
|
|
101
|
+
"static",
|
|
102
|
+
"compiled"
|
|
103
|
+
],
|
|
104
|
+
"imports": [
|
|
105
|
+
"import-no-extraneous-disable-for-examples-and-docs"
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0"
|
|
110
|
+
}
|