@amityco/ui-kit-open-source 3.1.1

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.
Files changed (54) hide show
  1. package/LICENSE +504 -0
  2. package/README.md +26 -0
  3. package/dist/Inter-Black-PFV6RWF7.woff2 +0 -0
  4. package/dist/Inter-BlackItalic-OUXR4CVK.woff2 +0 -0
  5. package/dist/Inter-Bold-K6PA7FOK.woff2 +0 -0
  6. package/dist/Inter-BoldItalic-QKFESTQE.woff2 +0 -0
  7. package/dist/Inter-ExtraBold-2ZPQFALF.woff2 +0 -0
  8. package/dist/Inter-ExtraBoldItalic-RR7KYXHD.woff2 +0 -0
  9. package/dist/Inter-ExtraLight-NASBO7I6.woff2 +0 -0
  10. package/dist/Inter-ExtraLightItalic-AUJY3XPT.woff2 +0 -0
  11. package/dist/Inter-Italic-2WJ2RX3Z.woff2 +0 -0
  12. package/dist/Inter-Light-E4ED7JRX.woff2 +0 -0
  13. package/dist/Inter-LightItalic-BJ4DXCNT.woff2 +0 -0
  14. package/dist/Inter-Medium-3R4SWUEO.woff2 +0 -0
  15. package/dist/Inter-MediumItalic-QTJUSOU7.woff2 +0 -0
  16. package/dist/Inter-Regular-6HYMGWZS.woff2 +0 -0
  17. package/dist/Inter-SemiBold-7SYQBR3A.woff2 +0 -0
  18. package/dist/Inter-SemiBoldItalic-3EHSSXIM.woff2 +0 -0
  19. package/dist/Inter-Thin-3L5KITMZ.woff2 +0 -0
  20. package/dist/Inter-ThinItalic-J7DGFM6P.woff2 +0 -0
  21. package/dist/Inter-italic.var-SWFAXF2C.woff2 +0 -0
  22. package/dist/Inter-roman.var-WIJJYAE4.woff2 +0 -0
  23. package/dist/Inter.var-OMHIC2JW.woff2 +0 -0
  24. package/dist/esm/Inter-Black-PFV6RWF7.woff2 +0 -0
  25. package/dist/esm/Inter-BlackItalic-OUXR4CVK.woff2 +0 -0
  26. package/dist/esm/Inter-Bold-K6PA7FOK.woff2 +0 -0
  27. package/dist/esm/Inter-BoldItalic-QKFESTQE.woff2 +0 -0
  28. package/dist/esm/Inter-ExtraBold-2ZPQFALF.woff2 +0 -0
  29. package/dist/esm/Inter-ExtraBoldItalic-RR7KYXHD.woff2 +0 -0
  30. package/dist/esm/Inter-ExtraLight-NASBO7I6.woff2 +0 -0
  31. package/dist/esm/Inter-ExtraLightItalic-AUJY3XPT.woff2 +0 -0
  32. package/dist/esm/Inter-Italic-2WJ2RX3Z.woff2 +0 -0
  33. package/dist/esm/Inter-Light-E4ED7JRX.woff2 +0 -0
  34. package/dist/esm/Inter-LightItalic-BJ4DXCNT.woff2 +0 -0
  35. package/dist/esm/Inter-Medium-3R4SWUEO.woff2 +0 -0
  36. package/dist/esm/Inter-MediumItalic-QTJUSOU7.woff2 +0 -0
  37. package/dist/esm/Inter-Regular-6HYMGWZS.woff2 +0 -0
  38. package/dist/esm/Inter-SemiBold-7SYQBR3A.woff2 +0 -0
  39. package/dist/esm/Inter-SemiBoldItalic-3EHSSXIM.woff2 +0 -0
  40. package/dist/esm/Inter-Thin-3L5KITMZ.woff2 +0 -0
  41. package/dist/esm/Inter-ThinItalic-J7DGFM6P.woff2 +0 -0
  42. package/dist/esm/Inter-italic.var-SWFAXF2C.woff2 +0 -0
  43. package/dist/esm/Inter-roman.var-WIJJYAE4.woff2 +0 -0
  44. package/dist/esm/Inter.var-OMHIC2JW.woff2 +0 -0
  45. package/dist/esm/index.css +1 -0
  46. package/dist/esm/index.js +3878 -0
  47. package/dist/index.css +1 -0
  48. package/dist/index.d.mts +205 -0
  49. package/dist/index.d.ts +205 -0
  50. package/dist/index.js +3930 -0
  51. package/dist/metafile-cjs.json +1 -0
  52. package/dist/metafile-esm.json +1 -0
  53. package/package.json +129 -0
  54. package/readme.md +26 -0
package/dist/index.css ADDED
@@ -0,0 +1 @@
1
+ @font-face{font-family:Inter;font-style:normal;font-weight:100;font-display:swap;src:url("./Inter-Thin-3L5KITMZ.woff2?v=3.19") format("woff2")}@font-face{font-family:Inter;font-style:italic;font-weight:100;font-display:swap;src:url("./Inter-ThinItalic-J7DGFM6P.woff2?v=3.19") format("woff2")}@font-face{font-family:Inter;font-style:normal;font-weight:200;font-display:swap;src:url("./Inter-ExtraLight-NASBO7I6.woff2?v=3.19") format("woff2")}@font-face{font-family:Inter;font-style:italic;font-weight:200;font-display:swap;src:url("./Inter-ExtraLightItalic-AUJY3XPT.woff2?v=3.19") format("woff2")}@font-face{font-family:Inter;font-style:normal;font-weight:300;font-display:swap;src:url("./Inter-Light-E4ED7JRX.woff2?v=3.19") format("woff2")}@font-face{font-family:Inter;font-style:italic;font-weight:300;font-display:swap;src:url("./Inter-LightItalic-BJ4DXCNT.woff2?v=3.19") format("woff2")}@font-face{font-family:Inter;font-style:normal;font-weight:400;font-display:swap;src:url("./Inter-Regular-6HYMGWZS.woff2?v=3.19") format("woff2")}@font-face{font-family:Inter;font-style:italic;font-weight:400;font-display:swap;src:url("./Inter-Italic-2WJ2RX3Z.woff2?v=3.19") format("woff2")}@font-face{font-family:Inter;font-style:normal;font-weight:500;font-display:swap;src:url("./Inter-Medium-3R4SWUEO.woff2?v=3.19") format("woff2")}@font-face{font-family:Inter;font-style:italic;font-weight:500;font-display:swap;src:url("./Inter-MediumItalic-QTJUSOU7.woff2?v=3.19") format("woff2")}@font-face{font-family:Inter;font-style:normal;font-weight:600;font-display:swap;src:url("./Inter-SemiBold-7SYQBR3A.woff2?v=3.19") format("woff2")}@font-face{font-family:Inter;font-style:italic;font-weight:600;font-display:swap;src:url("./Inter-SemiBoldItalic-3EHSSXIM.woff2?v=3.19") format("woff2")}@font-face{font-family:Inter;font-style:normal;font-weight:700;font-display:swap;src:url("./Inter-Bold-K6PA7FOK.woff2?v=3.19") format("woff2")}@font-face{font-family:Inter;font-style:italic;font-weight:700;font-display:swap;src:url("./Inter-BoldItalic-QKFESTQE.woff2?v=3.19") format("woff2")}@font-face{font-family:Inter;font-style:normal;font-weight:800;font-display:swap;src:url("./Inter-ExtraBold-2ZPQFALF.woff2?v=3.19") format("woff2")}@font-face{font-family:Inter;font-style:italic;font-weight:800;font-display:swap;src:url("./Inter-ExtraBoldItalic-RR7KYXHD.woff2?v=3.19") format("woff2")}@font-face{font-family:Inter;font-style:normal;font-weight:900;font-display:swap;src:url("./Inter-Black-PFV6RWF7.woff2?v=3.19") format("woff2")}@font-face{font-family:Inter;font-style:italic;font-weight:900;font-display:swap;src:url("./Inter-BlackItalic-OUXR4CVK.woff2?v=3.19") format("woff2")}@font-face{font-family:Inter var;font-style:normal;font-weight:100 900;font-display:swap;src:url("./Inter-roman.var-WIJJYAE4.woff2?v=3.19") format("woff2");font-named-instance:"Regular"}@font-face{font-family:Inter var;font-style:italic;font-weight:100 900;font-display:swap;src:url("./Inter-italic.var-SWFAXF2C.woff2?v=3.19") format("woff2");font-named-instance:"Italic"}@font-face{font-family:Inter var experimental;font-style:oblique 0deg 10deg;font-weight:100 900;font-display:swap;src:url("./Inter.var-OMHIC2JW.woff2?v=3.19") format("woff2")}@font-face{font-family:Inter var alt;font-weight:100 900;font-style:normal;font-named-instance:"Regular";font-display:swap;src:url("./Inter-roman.var-WIJJYAE4.woff2?v=3.19") format("woff2")}@font-face{font-family:Inter var alt;font-weight:100 900;font-style:italic;font-named-instance:"Italic";font-display:swap;src:url("./Inter-italic.var-SWFAXF2C.woff2?v=3.19") format("woff2")}@keyframes react-loading-skeleton{to{transform:translate(100%)}}.react-loading-skeleton{--base-color: #ebebeb;--highlight-color: #f5f5f5;--animation-duration: 1.5s;--animation-direction: normal;--pseudo-element-display: block;background-color:var(--base-color);width:100%;border-radius:.25rem;display:inline-flex;line-height:1;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;overflow:hidden;z-index:1}.react-loading-skeleton:after{content:" ";display:var(--pseudo-element-display);position:absolute;top:0;left:0;right:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(90deg,var(--base-color),var(--highlight-color),var(--base-color));transform:translate(-100%);animation-name:react-loading-skeleton;animation-direction:var(--animation-direction);animation-duration:var(--animation-duration);animation-timing-function:ease-in-out;animation-iteration-count:infinite}@media (prefers-reduced-motion){.react-loading-skeleton{--pseudo-element-display: none}}
@@ -0,0 +1,205 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { PostContentType } from '@amityco/ts-sdk';
3
+ import * as styled_components from 'styled-components';
4
+ import * as styled_components_dist_types from 'styled-components/dist/types';
5
+
6
+ type CustomComponentName = 'Avatar' | 'CategoryHeader' | 'CategorySelector' | 'Chat' | 'ChatDetails' | 'ChatHeader' | 'ChatItem' | 'Comment' | 'CommentComposerBar' | 'CommentLikeButton' | 'CommunityCreatedModel' | 'CommunityCreationModal' | 'CommunityForm' | 'CommunityItem' | 'CommunityMembers' | 'CommunityName' | 'CommunityPermissions' | 'EmptyFeed' | 'EngagementBar' | 'Feed' | 'FeedHeaderTabs' | 'File' | 'Image' | 'ImageGallery' | 'Images' | 'Layout' | 'MediaGallery' | 'MenuTab' | 'Message' | 'MessageComposerBar' | 'MessageList' | 'Post' | 'PostLikeButton' | 'PostTargetSelector' | 'ProfileSettings' | 'ProfileSettingsTabs' | 'RecentChat' | 'SideNavBar' | 'SocialSearch' | 'Tabs' | 'UICategoryCard' | 'UICommunityCard' | 'UICommunityHeader' | 'UICommunityInfo' | 'UIEngagementBar' | 'UIPostHeader' | 'UITextContent' | 'UITrendingItem' | 'UIUserInfo' | 'UserChip' | 'UserHeader' | 'UserSelector';
7
+ type CustomComponentType = Partial<Record<CustomComponentName, <TProps>(props: TProps) => React.ReactElement<TProps>>>;
8
+
9
+ type PostRendererProps = {
10
+ childrenPosts?: Amity.Post[];
11
+ className?: string;
12
+ currentUserId?: string;
13
+ handleDeletePost?: (postId: string) => void;
14
+ handleReportPost?: () => void;
15
+ handleUnreportPost?: () => void;
16
+ handleApprovePost?: () => void;
17
+ handleDeclinePost?: () => void;
18
+ handleClosePoll?: () => void;
19
+ poll?: Amity.Poll | null;
20
+ isPollClosed?: boolean;
21
+ hidePostTarget?: boolean;
22
+ isFlaggedByMe?: boolean;
23
+ readonly?: boolean;
24
+ post?: Amity.Post;
25
+ user?: Amity.User | null;
26
+ userRoles?: string[];
27
+ loading?: boolean;
28
+ avatarFileUrl?: string;
29
+ };
30
+ type PostRendererConfigType = Record<ValueOf<typeof PostContentType> | string, (props: PostRendererProps) => ReactNode>;
31
+
32
+ interface UiKitProviderProps {
33
+ apiKey: string;
34
+ apiRegion: string;
35
+ apiEndpoint?: {
36
+ http?: string;
37
+ mqtt?: string;
38
+ };
39
+ authToken?: string;
40
+ userId: string;
41
+ displayName: string;
42
+ customComponents?: CustomComponentType;
43
+ postRendererConfig?: PostRendererConfigType;
44
+ theme?: Record<string, unknown>;
45
+ children?: React.ReactNode;
46
+ actionHandlers?: {
47
+ onChangePage?: (data: {
48
+ type: string;
49
+ [x: string]: string | boolean;
50
+ }) => void;
51
+ onClickCategory?: (categoryId: string) => void;
52
+ onClickCommunity?: (communityId: string) => void;
53
+ onClickUser?: (userId: string) => void;
54
+ onCommunityCreated?: (communityId: string) => void;
55
+ onEditCommunity?: (communityId: string, options?: {
56
+ tab?: string;
57
+ }) => void;
58
+ onEditUser?: (userId: string) => void;
59
+ onMessageUser?: (userId: string) => void;
60
+ };
61
+ socialCommunityCreationButtonVisible?: boolean;
62
+ onConnectionStatusChange?: (state: Amity.SessionStates) => void;
63
+ onConnected?: () => void;
64
+ onDisconnected?: () => void;
65
+ }
66
+ declare const UiKitProvider: ({ apiKey, apiRegion, apiEndpoint, userId, displayName, customComponents, postRendererConfig, theme, children, socialCommunityCreationButtonVisible, actionHandlers, onConnectionStatusChange, onDisconnected, }: UiKitProviderProps) => React.JSX.Element;
67
+
68
+ interface FeedProps {
69
+ className?: string;
70
+ feedType?: 'reviewing' | 'published';
71
+ targetType?: string;
72
+ targetId?: string | null;
73
+ showPostCreator?: boolean;
74
+ onPostCreated?: () => void;
75
+ goToExplore?: () => void;
76
+ readonly?: boolean;
77
+ isHiddenProfile?: boolean;
78
+ }
79
+ declare const _default$2: React.MemoExoticComponent<(props: FeedProps) => React.JSX.Element>;
80
+
81
+ declare const Community: () => React.JSX.Element;
82
+
83
+ type PartialChannel = Pick<Amity.Channel, 'channelId' | 'type'>;
84
+ declare const ChatApplication: ({ membershipFilter, defaultChannelId, onMemberSelect, onChannelSelect, onAddNewChannel, onEditChatMember, }: {
85
+ membershipFilter?: "all" | "member" | "notMember" | undefined;
86
+ defaultChannelId: string | null;
87
+ onMemberSelect?: ((member: Amity.Membership<'channel'>) => void) | undefined;
88
+ onChannelSelect?: ((channel: PartialChannel) => void) | undefined;
89
+ onAddNewChannel?: (() => void) | undefined;
90
+ onEditChatMember?: (({ channel, members, }: {
91
+ channel: Amity.Channel;
92
+ members: Amity.Membership<'channel'>[];
93
+ }) => void) | undefined;
94
+ }) => React.JSX.Element;
95
+
96
+ declare const addChatMembers: (channelId: string, userIds: string[]) => Promise<boolean>;
97
+
98
+ declare const removeChatMembers: (channelId: string, userIds: string[]) => Promise<boolean>;
99
+
100
+ declare const useUser: (userId?: string | null) => Amity.User | null;
101
+
102
+ declare const enum PageTypes {
103
+ Explore = "explore",
104
+ Category = "category",
105
+ NewsFeed = "newsfeed",
106
+ UserFeed = "userfeed",
107
+ CommunityFeed = "communityfeed",
108
+ CommunityEdit = "communityedit",
109
+ UserEdit = "useredit"
110
+ }
111
+
112
+ type Page = {
113
+ type: PageTypes.Explore | PageTypes.NewsFeed;
114
+ communityId?: string;
115
+ } | {
116
+ type: PageTypes.CommunityFeed;
117
+ communityId: string;
118
+ isNewCommunity: boolean;
119
+ } | {
120
+ type: PageTypes.CommunityEdit;
121
+ communityId: string;
122
+ tab: string;
123
+ } | {
124
+ type: PageTypes.Category;
125
+ categoryId: string;
126
+ communityId?: string;
127
+ } | {
128
+ type: PageTypes.UserFeed | PageTypes.UserEdit;
129
+ userId: string;
130
+ communityId?: string;
131
+ };
132
+ type ContextValue = {
133
+ page: Page;
134
+ onChangePage: (type: string) => void;
135
+ onClickCategory: (categoryId: string) => void;
136
+ onClickCommunity: (communityId: string) => void;
137
+ onClickUser: (userId: string, pageType?: string) => void;
138
+ onCommunityCreated: (communityId: string) => void;
139
+ onEditCommunity: (communityId: string, tab?: string) => void;
140
+ onEditUser: (userId: string) => void;
141
+ onMessageUser: (userId: string) => void;
142
+ onBack: () => void;
143
+ setNavigationBlocker?: (params: {
144
+ title: ReactNode;
145
+ content: ReactNode;
146
+ okText: ReactNode;
147
+ } | null | undefined) => void;
148
+ };
149
+ declare const useNavigation: () => ContextValue;
150
+
151
+ declare const SIZE_ALIAS: {
152
+ BIG: string;
153
+ REGULAR: string;
154
+ SMALL: string;
155
+ TINY: string;
156
+ };
157
+
158
+ interface AvatarProps {
159
+ className?: string;
160
+ avatar?: string | null;
161
+ showOverlay?: boolean;
162
+ size?: ValueOf<typeof SIZE_ALIAS> | null;
163
+ onClick?: () => void;
164
+ loading?: boolean;
165
+ backgroundImage?: string | null;
166
+ }
167
+ declare const _default$1: (props: AvatarProps) => React.JSX.Element;
168
+
169
+ declare const PostContainer: styled_components.IStyledComponent<"web", styled_components_dist_types.FastOmit<{
170
+ className?: string | undefined;
171
+ children?: ReactNode;
172
+ }, never>> & Omit<({ className, ...props }: {
173
+ className?: string | undefined;
174
+ children?: ReactNode;
175
+ }) => React.JSX.Element, keyof React.Component<any, {}, any>>;
176
+
177
+ type Mentioned = {
178
+ userId: string;
179
+ length: number;
180
+ index: number;
181
+ type: string;
182
+ };
183
+
184
+ interface EngagementBarProps {
185
+ postId: string;
186
+ readonly?: boolean;
187
+ }
188
+
189
+ declare const _default: React.MemoExoticComponent<(props: EngagementBarProps) => React.JSX.Element>;
190
+
191
+ interface CommentTextProps {
192
+ text?: string;
193
+ className?: string;
194
+ mentionees?: Mentioned[];
195
+ maxLines?: number;
196
+ }
197
+ declare const CommentText: ({ text, className, mentionees, maxLines, }: CommentTextProps) => React.JSX.Element | null;
198
+
199
+ declare const useSDK: () => {
200
+ client?: Amity.Client | null | undefined;
201
+ currentUserId?: string | null | undefined;
202
+ userRoles: string[];
203
+ };
204
+
205
+ export { _default$1 as AmityAvatar, CommentText as AmityExpandableText, PostContainer as AmityPostContainer, _default as AmityPostEngagementBar, ChatApplication as AmityUiKitChat, _default$2 as AmityUiKitFeed, UiKitProvider as AmityUiKitProvider, Community as AmityUiKitSocial, addChatMembers as amityAddChatMembers, removeChatMembers as amityRemoveChatMembers, useNavigation as useAmityNavigation, useSDK as useAmitySDK, useUser as useAmityUser };
@@ -0,0 +1,205 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { PostContentType } from '@amityco/ts-sdk';
3
+ import * as styled_components from 'styled-components';
4
+ import * as styled_components_dist_types from 'styled-components/dist/types';
5
+
6
+ type CustomComponentName = 'Avatar' | 'CategoryHeader' | 'CategorySelector' | 'Chat' | 'ChatDetails' | 'ChatHeader' | 'ChatItem' | 'Comment' | 'CommentComposerBar' | 'CommentLikeButton' | 'CommunityCreatedModel' | 'CommunityCreationModal' | 'CommunityForm' | 'CommunityItem' | 'CommunityMembers' | 'CommunityName' | 'CommunityPermissions' | 'EmptyFeed' | 'EngagementBar' | 'Feed' | 'FeedHeaderTabs' | 'File' | 'Image' | 'ImageGallery' | 'Images' | 'Layout' | 'MediaGallery' | 'MenuTab' | 'Message' | 'MessageComposerBar' | 'MessageList' | 'Post' | 'PostLikeButton' | 'PostTargetSelector' | 'ProfileSettings' | 'ProfileSettingsTabs' | 'RecentChat' | 'SideNavBar' | 'SocialSearch' | 'Tabs' | 'UICategoryCard' | 'UICommunityCard' | 'UICommunityHeader' | 'UICommunityInfo' | 'UIEngagementBar' | 'UIPostHeader' | 'UITextContent' | 'UITrendingItem' | 'UIUserInfo' | 'UserChip' | 'UserHeader' | 'UserSelector';
7
+ type CustomComponentType = Partial<Record<CustomComponentName, <TProps>(props: TProps) => React.ReactElement<TProps>>>;
8
+
9
+ type PostRendererProps = {
10
+ childrenPosts?: Amity.Post[];
11
+ className?: string;
12
+ currentUserId?: string;
13
+ handleDeletePost?: (postId: string) => void;
14
+ handleReportPost?: () => void;
15
+ handleUnreportPost?: () => void;
16
+ handleApprovePost?: () => void;
17
+ handleDeclinePost?: () => void;
18
+ handleClosePoll?: () => void;
19
+ poll?: Amity.Poll | null;
20
+ isPollClosed?: boolean;
21
+ hidePostTarget?: boolean;
22
+ isFlaggedByMe?: boolean;
23
+ readonly?: boolean;
24
+ post?: Amity.Post;
25
+ user?: Amity.User | null;
26
+ userRoles?: string[];
27
+ loading?: boolean;
28
+ avatarFileUrl?: string;
29
+ };
30
+ type PostRendererConfigType = Record<ValueOf<typeof PostContentType> | string, (props: PostRendererProps) => ReactNode>;
31
+
32
+ interface UiKitProviderProps {
33
+ apiKey: string;
34
+ apiRegion: string;
35
+ apiEndpoint?: {
36
+ http?: string;
37
+ mqtt?: string;
38
+ };
39
+ authToken?: string;
40
+ userId: string;
41
+ displayName: string;
42
+ customComponents?: CustomComponentType;
43
+ postRendererConfig?: PostRendererConfigType;
44
+ theme?: Record<string, unknown>;
45
+ children?: React.ReactNode;
46
+ actionHandlers?: {
47
+ onChangePage?: (data: {
48
+ type: string;
49
+ [x: string]: string | boolean;
50
+ }) => void;
51
+ onClickCategory?: (categoryId: string) => void;
52
+ onClickCommunity?: (communityId: string) => void;
53
+ onClickUser?: (userId: string) => void;
54
+ onCommunityCreated?: (communityId: string) => void;
55
+ onEditCommunity?: (communityId: string, options?: {
56
+ tab?: string;
57
+ }) => void;
58
+ onEditUser?: (userId: string) => void;
59
+ onMessageUser?: (userId: string) => void;
60
+ };
61
+ socialCommunityCreationButtonVisible?: boolean;
62
+ onConnectionStatusChange?: (state: Amity.SessionStates) => void;
63
+ onConnected?: () => void;
64
+ onDisconnected?: () => void;
65
+ }
66
+ declare const UiKitProvider: ({ apiKey, apiRegion, apiEndpoint, userId, displayName, customComponents, postRendererConfig, theme, children, socialCommunityCreationButtonVisible, actionHandlers, onConnectionStatusChange, onDisconnected, }: UiKitProviderProps) => React.JSX.Element;
67
+
68
+ interface FeedProps {
69
+ className?: string;
70
+ feedType?: 'reviewing' | 'published';
71
+ targetType?: string;
72
+ targetId?: string | null;
73
+ showPostCreator?: boolean;
74
+ onPostCreated?: () => void;
75
+ goToExplore?: () => void;
76
+ readonly?: boolean;
77
+ isHiddenProfile?: boolean;
78
+ }
79
+ declare const _default$2: React.MemoExoticComponent<(props: FeedProps) => React.JSX.Element>;
80
+
81
+ declare const Community: () => React.JSX.Element;
82
+
83
+ type PartialChannel = Pick<Amity.Channel, 'channelId' | 'type'>;
84
+ declare const ChatApplication: ({ membershipFilter, defaultChannelId, onMemberSelect, onChannelSelect, onAddNewChannel, onEditChatMember, }: {
85
+ membershipFilter?: "all" | "member" | "notMember" | undefined;
86
+ defaultChannelId: string | null;
87
+ onMemberSelect?: ((member: Amity.Membership<'channel'>) => void) | undefined;
88
+ onChannelSelect?: ((channel: PartialChannel) => void) | undefined;
89
+ onAddNewChannel?: (() => void) | undefined;
90
+ onEditChatMember?: (({ channel, members, }: {
91
+ channel: Amity.Channel;
92
+ members: Amity.Membership<'channel'>[];
93
+ }) => void) | undefined;
94
+ }) => React.JSX.Element;
95
+
96
+ declare const addChatMembers: (channelId: string, userIds: string[]) => Promise<boolean>;
97
+
98
+ declare const removeChatMembers: (channelId: string, userIds: string[]) => Promise<boolean>;
99
+
100
+ declare const useUser: (userId?: string | null) => Amity.User | null;
101
+
102
+ declare const enum PageTypes {
103
+ Explore = "explore",
104
+ Category = "category",
105
+ NewsFeed = "newsfeed",
106
+ UserFeed = "userfeed",
107
+ CommunityFeed = "communityfeed",
108
+ CommunityEdit = "communityedit",
109
+ UserEdit = "useredit"
110
+ }
111
+
112
+ type Page = {
113
+ type: PageTypes.Explore | PageTypes.NewsFeed;
114
+ communityId?: string;
115
+ } | {
116
+ type: PageTypes.CommunityFeed;
117
+ communityId: string;
118
+ isNewCommunity: boolean;
119
+ } | {
120
+ type: PageTypes.CommunityEdit;
121
+ communityId: string;
122
+ tab: string;
123
+ } | {
124
+ type: PageTypes.Category;
125
+ categoryId: string;
126
+ communityId?: string;
127
+ } | {
128
+ type: PageTypes.UserFeed | PageTypes.UserEdit;
129
+ userId: string;
130
+ communityId?: string;
131
+ };
132
+ type ContextValue = {
133
+ page: Page;
134
+ onChangePage: (type: string) => void;
135
+ onClickCategory: (categoryId: string) => void;
136
+ onClickCommunity: (communityId: string) => void;
137
+ onClickUser: (userId: string, pageType?: string) => void;
138
+ onCommunityCreated: (communityId: string) => void;
139
+ onEditCommunity: (communityId: string, tab?: string) => void;
140
+ onEditUser: (userId: string) => void;
141
+ onMessageUser: (userId: string) => void;
142
+ onBack: () => void;
143
+ setNavigationBlocker?: (params: {
144
+ title: ReactNode;
145
+ content: ReactNode;
146
+ okText: ReactNode;
147
+ } | null | undefined) => void;
148
+ };
149
+ declare const useNavigation: () => ContextValue;
150
+
151
+ declare const SIZE_ALIAS: {
152
+ BIG: string;
153
+ REGULAR: string;
154
+ SMALL: string;
155
+ TINY: string;
156
+ };
157
+
158
+ interface AvatarProps {
159
+ className?: string;
160
+ avatar?: string | null;
161
+ showOverlay?: boolean;
162
+ size?: ValueOf<typeof SIZE_ALIAS> | null;
163
+ onClick?: () => void;
164
+ loading?: boolean;
165
+ backgroundImage?: string | null;
166
+ }
167
+ declare const _default$1: (props: AvatarProps) => React.JSX.Element;
168
+
169
+ declare const PostContainer: styled_components.IStyledComponent<"web", styled_components_dist_types.FastOmit<{
170
+ className?: string | undefined;
171
+ children?: ReactNode;
172
+ }, never>> & Omit<({ className, ...props }: {
173
+ className?: string | undefined;
174
+ children?: ReactNode;
175
+ }) => React.JSX.Element, keyof React.Component<any, {}, any>>;
176
+
177
+ type Mentioned = {
178
+ userId: string;
179
+ length: number;
180
+ index: number;
181
+ type: string;
182
+ };
183
+
184
+ interface EngagementBarProps {
185
+ postId: string;
186
+ readonly?: boolean;
187
+ }
188
+
189
+ declare const _default: React.MemoExoticComponent<(props: EngagementBarProps) => React.JSX.Element>;
190
+
191
+ interface CommentTextProps {
192
+ text?: string;
193
+ className?: string;
194
+ mentionees?: Mentioned[];
195
+ maxLines?: number;
196
+ }
197
+ declare const CommentText: ({ text, className, mentionees, maxLines, }: CommentTextProps) => React.JSX.Element | null;
198
+
199
+ declare const useSDK: () => {
200
+ client?: Amity.Client | null | undefined;
201
+ currentUserId?: string | null | undefined;
202
+ userRoles: string[];
203
+ };
204
+
205
+ export { _default$1 as AmityAvatar, CommentText as AmityExpandableText, PostContainer as AmityPostContainer, _default as AmityPostEngagementBar, ChatApplication as AmityUiKitChat, _default$2 as AmityUiKitFeed, UiKitProvider as AmityUiKitProvider, Community as AmityUiKitSocial, addChatMembers as amityAddChatMembers, removeChatMembers as amityRemoveChatMembers, useNavigation as useAmityNavigation, useSDK as useAmitySDK, useUser as useAmityUser };