@medipha/feed 0.1.2 → 0.1.3
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/dist/app/runtime/feed-runtime-context.d.ts +1 -0
- package/dist/app/runtime/feed-session.d.ts +2 -0
- package/dist/features/comments/use-load-more-on-visible.d.ts +2 -0
- package/dist/features/comments/use-scroll-to-newest.d.ts +5 -0
- package/dist/features/post/card/post-card.d.ts +1 -3
- package/dist/features/post/card/post-header.d.ts +1 -2
- package/dist/features/post/content/link-preview-card.d.ts +3 -1
- package/dist/features/post/interactions/chat-share-modal.d.ts +11 -0
- package/dist/index.cjs +15 -15
- package/dist/index.js +3314 -3009
- package/dist/shared/hooks/use-post-modal-open.d.ts +3 -0
- package/dist/shared/utils/chat-share.d.ts +32 -0
- package/dist/styles.css +1 -1
- package/package.json +3 -2
|
@@ -5,6 +5,8 @@ export declare class FeedSession {
|
|
|
5
5
|
readonly api: FeedApi;
|
|
6
6
|
private props;
|
|
7
7
|
constructor(apiUrl: string);
|
|
8
|
+
/** The chat service is a different API, so the share modal needs the current token itself. */
|
|
9
|
+
getAccessToken: () => string;
|
|
8
10
|
update(props: SessionProps): void;
|
|
9
11
|
private refreshAccessToken;
|
|
10
12
|
}
|
|
@@ -9,7 +9,5 @@ export interface PostCardProps {
|
|
|
9
9
|
onRemoved?: (postId: string) => void;
|
|
10
10
|
/** modal mode: where the comment composer renders, outside the scrolling area. */
|
|
11
11
|
composerSlot?: HTMLElement | null;
|
|
12
|
-
/** Posted-at links to the post page; on by default in the feed only, where it leads somewhere new. */
|
|
13
|
-
linkTime?: boolean;
|
|
14
12
|
}
|
|
15
|
-
export declare function PostCard({ post, mode, footer, onChange, onRemoved, composerSlot,
|
|
13
|
+
export declare function PostCard({ post, mode, footer, onChange, onRemoved, composerSlot, }: PostCardProps): import('react/jsx-runtime').JSX.Element;
|
|
@@ -2,8 +2,7 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { FeedPost } from '../../../core';
|
|
3
3
|
interface PostHeaderProps {
|
|
4
4
|
post: FeedPost;
|
|
5
|
-
linkToDetail: boolean;
|
|
6
5
|
extra?: ReactNode;
|
|
7
6
|
}
|
|
8
|
-
export declare function PostHeader({ post,
|
|
7
|
+
export declare function PostHeader({ post, extra }: PostHeaderProps): import('react/jsx-runtime').JSX.Element;
|
|
9
8
|
export {};
|
|
@@ -4,6 +4,8 @@ interface LinkPreviewCardProps {
|
|
|
4
4
|
url?: string;
|
|
5
5
|
/** Post card: a model shared with the text, which hides the URL while the card shows it. */
|
|
6
6
|
model?: LinkPreviewModel;
|
|
7
|
+
/** Rendered inside a post modal: keeps playing while the feed behind it stops. */
|
|
8
|
+
inModal?: boolean;
|
|
7
9
|
}
|
|
8
|
-
export declare function LinkPreviewCard({ url: urlProp, model }: LinkPreviewCardProps): import('react/jsx-runtime').JSX.Element | null;
|
|
10
|
+
export declare function LinkPreviewCard({ url: urlProp, model, inModal }: LinkPreviewCardProps): import('react/jsx-runtime').JSX.Element | null;
|
|
9
11
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FeedPost } from '../../../core';
|
|
2
|
+
interface ChatShareModalProps {
|
|
3
|
+
post: FeedPost;
|
|
4
|
+
open: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
/** Called after the link reached chat, so the caller can count the share. */
|
|
7
|
+
onShared: () => void;
|
|
8
|
+
}
|
|
9
|
+
/** Same picker as the chat's "Chuyển tiếp": choose conversations, the post link goes in as a plain message. */
|
|
10
|
+
export declare function ChatShareModal({ post, open, onClose, onShared }: ChatShareModalProps): import('react/jsx-runtime').JSX.Element;
|
|
11
|
+
export {};
|