Multicolumn Bluesky client powered by Angular
1import {ChangeDetectionStrategy, Component, input} from '@angular/core';
2import {$Typed, AppBskyEmbedRecord, AppBskyFeedDefs, AppBskyGraphDefs, AppBskyLabelerDefs} from '@atproto/api';
3import {DisplayNamePipe} from '@shared/pipes/display-name.pipe';
4import {IsEmbedRecordViewRecordPipe} from '@shared/pipes/type-guards/is-embed-record-viewrecord.pipe';
5import {NgTemplateOutlet} from '@angular/common';
6import {IsFeedPostRecordPipe} from '@shared/pipes/type-guards/is-feed-post-record';
7import {RichTextComponent} from '@components/shared/rich-text/rich-text.component';
8import {IsEmbedImagesViewPipe} from '@shared/pipes/type-guards/is-embed-images-view.pipe';
9import {ImagesEmbedComponent} from '@components/embeds/images-embed/images-embed.component';
10import {IsEmbedVideoViewPipe} from '@shared/pipes/type-guards/is-embed-video-view.pipe';
11import {VideoEmbedComponent} from '@components/embeds/video-embed/video-embed.component';
12import {IsEmbedRecordWithMediaViewPipe} from '@shared/pipes/type-guards/is-embed-recordwithmedia-view.pipe';
13import {IsEmbedRecordViewBlockedPipe} from '@shared/pipes/type-guards/is-embed-record-viewblocked.pipe';
14import {IsEmbedRecordViewNotFoundPipe} from '@shared/pipes/type-guards/is-embed-record-viewnotfound.pipe';
15import {IsEmbedRecordViewDetachedPipe} from '@shared/pipes/type-guards/is-embed-record-viewdetached.pipe';
16import {IsFeedDefsGeneratorViewPipe} from '@shared/pipes/type-guards/is-feed-defs-generator-view';
17import {IsGraphDefsListViewPipe} from '@shared/pipes/type-guards/is-graph-defs-list-view';
18import {IsLabelerDefsLabelerViewPipe} from '@shared/pipes/type-guards/is-labeler-defs-labeler-view';
19import {IsGraphDefsStarterPackViewBasicPipe} from '@shared/pipes/type-guards/is-graph-defs-starterpack-viewbasic';
20import {IsEmbedExternalViewPipe} from '@shared/pipes/type-guards/is-embed-external-view.pipe';
21import {ExternalEmbedComponent} from '@components/embeds/external-embed/external-embed.component';
22
23@Component({
24 selector: 'record-embed',
25 imports: [
26 DisplayNamePipe,
27 IsEmbedRecordViewRecordPipe,
28 NgTemplateOutlet,
29 IsFeedPostRecordPipe,
30 RichTextComponent,
31 IsEmbedImagesViewPipe,
32 ImagesEmbedComponent,
33 IsEmbedVideoViewPipe,
34 VideoEmbedComponent,
35 IsEmbedRecordWithMediaViewPipe,
36 IsEmbedRecordViewBlockedPipe,
37 IsEmbedRecordViewNotFoundPipe,
38 IsEmbedRecordViewDetachedPipe,
39 IsFeedDefsGeneratorViewPipe,
40 IsGraphDefsListViewPipe,
41 IsLabelerDefsLabelerViewPipe,
42 IsGraphDefsStarterPackViewBasicPipe,
43 IsEmbedExternalViewPipe,
44 ExternalEmbedComponent
45 ],
46 templateUrl: './record-embed.component.html',
47 changeDetection: ChangeDetectionStrategy.OnPush
48})
49export class RecordEmbedComponent {
50 record = input<
51 | $Typed<AppBskyEmbedRecord.ViewRecord>
52 | $Typed<AppBskyEmbedRecord.ViewNotFound>
53 | $Typed<AppBskyEmbedRecord.ViewBlocked>
54 | $Typed<AppBskyEmbedRecord.ViewDetached>
55 | $Typed<AppBskyFeedDefs.GeneratorView>
56 | $Typed<AppBskyGraphDefs.ListView>
57 | $Typed<AppBskyLabelerDefs.LabelerView>
58 | $Typed<AppBskyGraphDefs.StarterPackViewBasic>
59 | { $type: string }
60 >();
61 protected readonly AppBskyFeedDefs = AppBskyFeedDefs;
62 protected readonly AppBskyGraphDefs = AppBskyGraphDefs;
63}