import { PropertyValueMap } from 'lit'; import { WeavySubAppComponent } from '../classes/weavy-sub-app-component'; import { ShadowPartsController } from '../controllers/shadow-parts-controller'; import { PostType } from '../types/posts.types'; declare global { interface HTMLElementTagNameMap { "wy-post-view": WyPostView; } } /** * Post view that renders the post content, attachments, polls, embeds and footer/meta. * * **Used sub components:** * * - [``](./ui/wy-avatar.ts) * - [``](./ui/wy-image-grid.ts) * - [``](./ui/wy-item.ts) * - [``](./ui/wy-skeleton.ts) * - [``](./wy-annotation.ts) * - [``](./wy-attachment.ts) * - [``](./wy-embed.ts) * - [``](./wy-poll.ts) * - [``](./wy-meeting-card.ts) * - [``](./wy-comment-list.ts) * - [``](./wy-preview.ts) * * @csspart wy-post - Root post container. * @csspart wy-highlight - Highlight modifier for linked posts. * @csspart wy-post-header - Main post header wrapper. * @csspart wy-post-body - Main post body wrapper. * @csspart wy-post-footer - Footer meta/actions area. * @csspart wy-content - HTML/content area. * @csspart wy-post-comments - Comments container. * @csspart wy-post-attachment-list - Attachments area list. * @csspart wy-post-reported - The filled flag in the header shown once the reader has reported the post. Hide it with `::part(wy-post-reported)` if reporting should be fire-and-forget. * * @fires {PollVoteEventType} vote - Emitted when a poll option is voted. * @fires {PostSubscribeEventType} subscribe - Emitted when subscribe/unsubscribe is requested. * @fires {PostTrashEventType} trash - Emitted when the post should be trashed. * @fires {PostEditEventType} edit - Emitted when edit mode is requested. * @fires {WyActionEventType} wy-action - Emitted when an embed action button is triggered. * @fires {WyPreviewOpenEventType} wy-preview-open - Fired when a preview overlay is about to open. * @fires {WyPreviewCloseEventType} wy-preview-close - Fired when a preview overlay is closed. */ export declare class WyPostView extends WeavySubAppComponent { #private; static styles: import('lit').CSSResult[]; protected exportParts: ShadowPartsController; /** * Post data. */ post: PostType; /** * Highlight the post when it matches the active deep link. */ highlight: boolean; /** * Placeholder text for the comment editor input. */ placeholder?: string; /** * Toggle indicating whether comments are currently visible. * * @internal */ private showComments; /** * Guard used to lazy-load comments when expanded. * * @internal */ private loadComments; /** * True when a linked comment targets this post. * * @internal */ isCommentLinked: boolean; /** * Preview instance handling annotation files. * * @internal */ private previewAnnotationsRef; /** * Preview instance handling attachment files. * * @internal */ private previewAttachmentsRef; /** * DOM reference used to scroll highlighted posts into view. * * @internal */ private highlightRef; /** * Emit a `vote` event for the specified poll option. * * @internal * @param optionId - Identifier of the selected poll option. * @returns {boolean} True if the event was not canceled. */ private dispatchVote; /** * Emit a `subscribe` event toggling post subscription state. * * @internal * @param subscribe - Desired subscription state. * @returns {boolean} True if the event was not canceled. */ private dispatchSubscribe; /** * Emit a `trash` event requesting the post to move into trash. * * @internal * @returns {boolean} True if the event was not canceled. */ private dispatchTrash; /** * Emit an `edit` event toggling edit mode for this post. * * @internal * @param edit - Desired edit state. * @returns {boolean} True if the event was not canceled. */ private dispatchEdit; /** * Confirm and report the post for moderation. * * Uses the native confirm rather than an in-app dialog, matching how reporting a message works: reporting cannot be * undone and there is no report to look up afterwards, so the interruption is the point. * * @internal */ private confirmReport; /** * Toggle comment visibility and ensure comment data is loaded. * * @internal * @param e - Click event originating from the comment button. */ private handleCommentsClick; protected willUpdate(changedProperties: PropertyValueMap): void; render(): import('../../node_modules/lit-html/node/lit-html.js').TemplateResult<1>; protected updated(changedProperties: PropertyValueMap): void; } //# sourceMappingURL=wy-post-view.d.ts.map