@atlaskit/editor-plugin-avatar-group 4.1.6 → 4.1.7

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-plugin-avatar-group
2
2
 
3
+ ## 4.1.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [`265c1bf0cefa4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/265c1bf0cefa4) -
8
+ Sorted type and interface props to improve Atlaskit docs
9
+ - Updated dependencies
10
+
3
11
  ## 4.1.6
4
12
 
5
13
  ### Patch Changes
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.scrollToCollabCursor = exports.Avatars = void 0;
7
+ exports.Avatars = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _react2 = require("@emotion/react");
10
10
  var _avatarGroup = _interopRequireDefault(require("@atlaskit/avatar-group"));
@@ -19,7 +19,7 @@ var _toAvatar = _interopRequireDefault(require("./to-avatar"));
19
19
 
20
20
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
21
21
 
22
- var scrollToCollabCursor = exports.scrollToCollabCursor = function scrollToCollabCursor(editorAPI, participants, sessionId, index, editorAnalyticsAPI) {
22
+ var scrollToCollabCursor = function scrollToCollabCursor(editorAPI, participants, sessionId, index, editorAnalyticsAPI) {
23
23
  var selectedUser = participants[index];
24
24
  var cursorPos = selectedUser.cursorPos;
25
25
  if (selectedUser && cursorPos !== undefined && selectedUser.sessionId !== sessionId) {
@@ -12,7 +12,7 @@ import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/anal
12
12
  import { Selection } from '@atlaskit/editor-prosemirror/state';
13
13
  import { avatarContainerStyles } from './styles';
14
14
  import toAvatar from './to-avatar';
15
- export const scrollToCollabCursor = (editorAPI, participants, sessionId, index, editorAnalyticsAPI) => {
15
+ const scrollToCollabCursor = (editorAPI, participants, sessionId, index, editorAnalyticsAPI) => {
16
16
  const selectedUser = participants[index];
17
17
  const cursorPos = selectedUser.cursorPos;
18
18
  if (selectedUser && cursorPos !== undefined && selectedUser.sessionId !== sessionId) {
@@ -12,7 +12,7 @@ import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/anal
12
12
  import { Selection } from '@atlaskit/editor-prosemirror/state';
13
13
  import { avatarContainerStyles } from './styles';
14
14
  import toAvatar from './to-avatar';
15
- export var scrollToCollabCursor = function scrollToCollabCursor(editorAPI, participants, sessionId, index, editorAnalyticsAPI) {
15
+ var scrollToCollabCursor = function scrollToCollabCursor(editorAPI, participants, sessionId, index, editorAnalyticsAPI) {
16
16
  var selectedUser = participants[index];
17
17
  var cursorPos = selectedUser.cursorPos;
18
18
  if (selectedUser && cursorPos !== undefined && selectedUser.sessionId !== sessionId) {
@@ -6,8 +6,8 @@ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
6
6
  import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
7
7
  export type AvatarGroupPluginOptions = {
8
8
  collabEdit?: CollabEditOptions;
9
- takeFullWidth: boolean;
10
9
  showAvatarGroup?: boolean;
10
+ takeFullWidth: boolean;
11
11
  };
12
12
  export type AvatarGroupPluginDependencies = [
13
13
  OptionalPlugin<FeatureFlagsPlugin>,
@@ -16,9 +16,9 @@ export type AvatarGroupPluginDependencies = [
16
16
  OptionalPlugin<PrimaryToolbarPlugin>
17
17
  ];
18
18
  export type AvatarGroupPlugin = NextEditorPlugin<'avatarGroup', {
19
- pluginConfiguration: AvatarGroupPluginOptions;
20
- dependencies: AvatarGroupPluginDependencies;
21
19
  actions: {
22
20
  getToolbarItem: ({ inviteToEditHandler, isInviteToEditButtonSelected, inviteToEditComponent, }: CollabInviteToEditProps) => JSX.Element | null;
23
21
  };
22
+ dependencies: AvatarGroupPluginDependencies;
23
+ pluginConfiguration: AvatarGroupPluginOptions;
24
24
  }>;
@@ -7,12 +7,12 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
7
7
  import type { AvatarGroupPlugin } from '../index';
8
8
  declare const AvatarGroupPluginWrapper: (props: {
9
9
  collabEdit?: CollabEditOptions;
10
- editorView: EditorView;
11
- eventDispatcher: EventDispatcher<any>;
12
10
  dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
13
- takeFullWidth: boolean;
14
- featureFlags: FeatureFlags;
15
11
  editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
16
12
  editorAPI: ExtractInjectionAPI<AvatarGroupPlugin> | undefined;
13
+ editorView: EditorView;
14
+ eventDispatcher: EventDispatcher<any>;
15
+ featureFlags: FeatureFlags;
16
+ takeFullWidth: boolean;
17
17
  }) => jsx.JSX.Element;
18
18
  export default AvatarGroupPluginWrapper;
@@ -6,26 +6,19 @@ import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
6
6
  import type { ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
7
7
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
8
8
  import type { AvatarGroupPlugin } from '../avatarGroupPluginType';
9
- export type AvatarsWithPluginStateProps = {
10
- editorView?: EditorView;
11
- eventDispatcher?: EventDispatcher;
12
- featureFlags: FeatureFlags;
9
+ declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
13
10
  editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
14
11
  editorAPI: ExtractInjectionAPI<AvatarGroupPlugin> | undefined;
15
- } & CollabInviteToEditProps;
16
- declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
17
12
  editorView?: EditorView;
18
13
  eventDispatcher?: EventDispatcher;
19
14
  featureFlags: FeatureFlags;
20
- editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
21
- editorAPI: ExtractInjectionAPI<AvatarGroupPlugin> | undefined;
22
15
  } & CollabInviteToEditProps & WrappedComponentProps>> & {
23
16
  WrappedComponent: React.ComponentType<{
17
+ editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
18
+ editorAPI: ExtractInjectionAPI<AvatarGroupPlugin> | undefined;
24
19
  editorView?: EditorView;
25
20
  eventDispatcher?: EventDispatcher;
26
21
  featureFlags: FeatureFlags;
27
- editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
28
- editorAPI: ExtractInjectionAPI<AvatarGroupPlugin> | undefined;
29
22
  } & CollabInviteToEditProps & WrappedComponentProps>;
30
23
  };
31
24
  export default _default;
@@ -6,19 +6,18 @@ import type { ReactNode } from 'react';
6
6
  import React from 'react';
7
7
  import { jsx } from '@emotion/react';
8
8
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
9
- import type { CollabParticipant } from '@atlaskit/editor-common/collab';
10
9
  import type { ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
11
10
  import type { ReadOnlyParticipants } from '@atlaskit/editor-plugin-collab-edit';
12
11
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
13
12
  import type { AvatarGroupPlugin } from '../avatarGroupPluginType';
14
- export interface AvatarsProps {
15
- sessionId?: string;
16
- participants: ReadOnlyParticipants | undefined;
17
- editorView?: EditorView;
18
- featureFlags: FeatureFlags;
13
+ interface AvatarsProps {
14
+ children: ReactNode;
19
15
  editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
20
16
  editorAPI: ExtractInjectionAPI<AvatarGroupPlugin> | undefined;
21
- children: ReactNode;
17
+ editorView?: EditorView;
18
+ featureFlags: FeatureFlags;
19
+ participants: ReadOnlyParticipants | undefined;
20
+ sessionId?: string;
22
21
  }
23
- export declare const scrollToCollabCursor: (editorAPI: ExtractInjectionAPI<AvatarGroupPlugin> | undefined, participants: CollabParticipant[], sessionId: string | undefined, index: number, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => void;
24
22
  export declare const Avatars: React.MemoExoticComponent<(props: AvatarsProps) => jsx.JSX.Element | null>;
23
+ export {};
@@ -5,10 +5,11 @@
5
5
  import { jsx } from '@emotion/react';
6
6
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
7
7
  import type { AvatarGroupPlugin } from '../avatarGroupPluginType';
8
- export interface ColoredAvatarItemProps {
9
- sessionId: string;
10
- presenceId?: string;
11
- name: string;
8
+ interface ColoredAvatarItemProps {
12
9
  api: ExtractInjectionAPI<AvatarGroupPlugin> | undefined;
10
+ name: string;
11
+ presenceId?: string;
12
+ sessionId: string;
13
13
  }
14
14
  export declare const ColoredAvatarItem: (props: ColoredAvatarItemProps) => jsx.JSX.Element;
15
+ export {};
@@ -5,10 +5,11 @@
5
5
  import React, { type PropsWithChildren } from 'react';
6
6
  import { jsx } from '@emotion/react';
7
7
  import type { InviteToEditComponentProps } from '@atlaskit/editor-common/collab';
8
- export type InviteToEditButtonProps = PropsWithChildren<{
8
+ type InviteToEditButtonProps = PropsWithChildren<{
9
+ Component?: React.ComponentType<React.PropsWithChildren<InviteToEditComponentProps>>;
9
10
  onClick?: React.MouseEventHandler;
10
11
  selected?: boolean;
11
- Component?: React.ComponentType<React.PropsWithChildren<InviteToEditComponentProps>>;
12
12
  title: string;
13
13
  }>;
14
14
  export declare const InviteToEditButton: (props: InviteToEditButtonProps) => jsx.JSX.Element | null;
15
+ export {};
@@ -6,8 +6,8 @@ import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
6
6
  import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
7
7
  export type AvatarGroupPluginOptions = {
8
8
  collabEdit?: CollabEditOptions;
9
- takeFullWidth: boolean;
10
9
  showAvatarGroup?: boolean;
10
+ takeFullWidth: boolean;
11
11
  };
12
12
  export type AvatarGroupPluginDependencies = [
13
13
  OptionalPlugin<FeatureFlagsPlugin>,
@@ -16,9 +16,9 @@ export type AvatarGroupPluginDependencies = [
16
16
  OptionalPlugin<PrimaryToolbarPlugin>
17
17
  ];
18
18
  export type AvatarGroupPlugin = NextEditorPlugin<'avatarGroup', {
19
- pluginConfiguration: AvatarGroupPluginOptions;
20
- dependencies: AvatarGroupPluginDependencies;
21
19
  actions: {
22
20
  getToolbarItem: ({ inviteToEditHandler, isInviteToEditButtonSelected, inviteToEditComponent, }: CollabInviteToEditProps) => JSX.Element | null;
23
21
  };
22
+ dependencies: AvatarGroupPluginDependencies;
23
+ pluginConfiguration: AvatarGroupPluginOptions;
24
24
  }>;
@@ -7,12 +7,12 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
7
7
  import type { AvatarGroupPlugin } from '../index';
8
8
  declare const AvatarGroupPluginWrapper: (props: {
9
9
  collabEdit?: CollabEditOptions;
10
- editorView: EditorView;
11
- eventDispatcher: EventDispatcher<any>;
12
10
  dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
13
- takeFullWidth: boolean;
14
- featureFlags: FeatureFlags;
15
11
  editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
16
12
  editorAPI: ExtractInjectionAPI<AvatarGroupPlugin> | undefined;
13
+ editorView: EditorView;
14
+ eventDispatcher: EventDispatcher<any>;
15
+ featureFlags: FeatureFlags;
16
+ takeFullWidth: boolean;
17
17
  }) => jsx.JSX.Element;
18
18
  export default AvatarGroupPluginWrapper;
@@ -6,26 +6,19 @@ import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
6
6
  import type { ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
7
7
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
8
8
  import type { AvatarGroupPlugin } from '../avatarGroupPluginType';
9
- export type AvatarsWithPluginStateProps = {
10
- editorView?: EditorView;
11
- eventDispatcher?: EventDispatcher;
12
- featureFlags: FeatureFlags;
9
+ declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
13
10
  editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
14
11
  editorAPI: ExtractInjectionAPI<AvatarGroupPlugin> | undefined;
15
- } & CollabInviteToEditProps;
16
- declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
17
12
  editorView?: EditorView;
18
13
  eventDispatcher?: EventDispatcher;
19
14
  featureFlags: FeatureFlags;
20
- editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
21
- editorAPI: ExtractInjectionAPI<AvatarGroupPlugin> | undefined;
22
15
  } & CollabInviteToEditProps & WrappedComponentProps>> & {
23
16
  WrappedComponent: React.ComponentType<{
17
+ editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
18
+ editorAPI: ExtractInjectionAPI<AvatarGroupPlugin> | undefined;
24
19
  editorView?: EditorView;
25
20
  eventDispatcher?: EventDispatcher;
26
21
  featureFlags: FeatureFlags;
27
- editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
28
- editorAPI: ExtractInjectionAPI<AvatarGroupPlugin> | undefined;
29
22
  } & CollabInviteToEditProps & WrappedComponentProps>;
30
23
  };
31
24
  export default _default;
@@ -6,19 +6,18 @@ import type { ReactNode } from 'react';
6
6
  import React from 'react';
7
7
  import { jsx } from '@emotion/react';
8
8
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
9
- import type { CollabParticipant } from '@atlaskit/editor-common/collab';
10
9
  import type { ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
11
10
  import type { ReadOnlyParticipants } from '@atlaskit/editor-plugin-collab-edit';
12
11
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
13
12
  import type { AvatarGroupPlugin } from '../avatarGroupPluginType';
14
- export interface AvatarsProps {
15
- sessionId?: string;
16
- participants: ReadOnlyParticipants | undefined;
17
- editorView?: EditorView;
18
- featureFlags: FeatureFlags;
13
+ interface AvatarsProps {
14
+ children: ReactNode;
19
15
  editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
20
16
  editorAPI: ExtractInjectionAPI<AvatarGroupPlugin> | undefined;
21
- children: ReactNode;
17
+ editorView?: EditorView;
18
+ featureFlags: FeatureFlags;
19
+ participants: ReadOnlyParticipants | undefined;
20
+ sessionId?: string;
22
21
  }
23
- export declare const scrollToCollabCursor: (editorAPI: ExtractInjectionAPI<AvatarGroupPlugin> | undefined, participants: CollabParticipant[], sessionId: string | undefined, index: number, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => void;
24
22
  export declare const Avatars: React.MemoExoticComponent<(props: AvatarsProps) => jsx.JSX.Element | null>;
23
+ export {};
@@ -5,10 +5,11 @@
5
5
  import { jsx } from '@emotion/react';
6
6
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
7
7
  import type { AvatarGroupPlugin } from '../avatarGroupPluginType';
8
- export interface ColoredAvatarItemProps {
9
- sessionId: string;
10
- presenceId?: string;
11
- name: string;
8
+ interface ColoredAvatarItemProps {
12
9
  api: ExtractInjectionAPI<AvatarGroupPlugin> | undefined;
10
+ name: string;
11
+ presenceId?: string;
12
+ sessionId: string;
13
13
  }
14
14
  export declare const ColoredAvatarItem: (props: ColoredAvatarItemProps) => jsx.JSX.Element;
15
+ export {};
@@ -5,10 +5,11 @@
5
5
  import React, { type PropsWithChildren } from 'react';
6
6
  import { jsx } from '@emotion/react';
7
7
  import type { InviteToEditComponentProps } from '@atlaskit/editor-common/collab';
8
- export type InviteToEditButtonProps = PropsWithChildren<{
8
+ type InviteToEditButtonProps = PropsWithChildren<{
9
+ Component?: React.ComponentType<React.PropsWithChildren<InviteToEditComponentProps>>;
9
10
  onClick?: React.MouseEventHandler;
10
11
  selected?: boolean;
11
- Component?: React.ComponentType<React.PropsWithChildren<InviteToEditComponentProps>>;
12
12
  title: string;
13
13
  }>;
14
14
  export declare const InviteToEditButton: (props: InviteToEditButtonProps) => jsx.JSX.Element | null;
15
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-avatar-group",
3
- "version": "4.1.6",
3
+ "version": "4.1.7",
4
4
  "description": "Avatar Group plugin for @atlaskit/editor-core.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -45,7 +45,7 @@
45
45
  "@atlaskit/icon": "^28.0.0",
46
46
  "@atlaskit/platform-feature-flags": "^1.1.0",
47
47
  "@atlaskit/theme": "^19.0.0",
48
- "@atlaskit/tmp-editor-statsig": "^11.3.0",
48
+ "@atlaskit/tmp-editor-statsig": "^11.5.0",
49
49
  "@atlaskit/tokens": "^6.0.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "@emotion/react": "^11.7.1",
@@ -53,7 +53,7 @@
53
53
  "react-intl-next": "npm:react-intl@^5.18.1"
54
54
  },
55
55
  "peerDependencies": {
56
- "@atlaskit/editor-common": "^107.26.0",
56
+ "@atlaskit/editor-common": "^107.28.0",
57
57
  "react": "^18.2.0"
58
58
  },
59
59
  "techstack": {